<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Betreff: Solid3d.StlOut with a better quality? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407377#M16026</link>
    <description>&lt;P&gt;Other way for setting FACETRES is using &lt;STRONG&gt;&lt;EM&gt;Database.Facetres&lt;/EM&gt;&lt;/STRONG&gt; property.&lt;/P&gt;
&lt;DIV id="s3gt_translate_tooltip_mini" class="s3gt_translate_tooltip_mini_box" style="background: initial !important; border: initial !important; border-radius: initial !important; border-spacing: initial !important; border-collapse: initial !important; direction: ltr !important; flex-direction: initial !important; font-weight: initial !important; height: initial !important; letter-spacing: initial !important; min-width: initial !important; max-width: initial !important; min-height: initial !important; max-height: initial !important; margin: auto !important; outline: initial !important; padding: initial !important; position: absolute; table-layout: initial !important; text-align: initial !important; text-shadow: initial !important; width: initial !important; word-break: initial !important; word-spacing: initial !important; overflow-wrap: initial !important; box-sizing: initial !important; display: initial !important; color: inherit !important; font-size: 13px !important; font-family: X-LocaleSpecific, sans-serif, Tahoma, Helvetica !important; line-height: 13px !important; vertical-align: top !important; white-space: inherit !important; left: 457px; top: 35px; opacity: 0.5;"&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_logo" class="s3gt_translate_tooltip_mini" title="Перевести выделенный фрагмент"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_sound" class="s3gt_translate_tooltip_mini" title="Прослушать"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_copy" class="s3gt_translate_tooltip_mini" title="Скопировать текст в буфер обмена"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Mon, 21 Jun 2021 10:28:53 GMT</pubDate>
    <dc:creator>Alexander.Rivilis</dc:creator>
    <dc:date>2021-06-21T10:28:53Z</dc:date>
    <item>
      <title>Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10405732#M16020</link>
      <description>&lt;P&gt;I had a script that eported my models to stl-files.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;thisDrawing.SendCommand("STLOUT" +
    " " +
    "g" +
    " " +
    group.Name +
    Environment.NewLine +
    " " +
    " " +
    completeFilename +
    Environment.NewLine);&lt;/LI-CODE&gt;&lt;P&gt;And i used the FACETRES variable to change the model quality.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;acApp.SetSystemVariable("FACETRES", 8);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First problem is: Since Acad2021 it does no longer change the variable via script. Other variables like FILEDIA are still working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second: I found a better way to export the models. But this example completly ignore the FACETRES value and and export super lowpoly only.&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Solid3d sol = (Solid3d)tr.GetObject(myId, OpenMode.ForRead);
sol.StlOut(Path.Combine(targetDirectory, newFileName + ".stl"), true); //ignore facetres settings&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's possible to get a higher quality with that solid3d.stlout command?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 16:13:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10405732#M16020</guid>
      <dc:creator>stefan.hofer</dc:creator>
      <dc:date>2021-06-20T16:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10405918#M16021</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/114331"&gt;@stefan.hofer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;...First problem is: Since Acad2021 it does no longer change the variable via script. Other variables like FILEDIA are still working.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you sure??? &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/114331"&gt;@stefan.hofer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Second: I found a better way to export the models. But this example completly ignore the FACETRES value and and export super lowpoly only.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;Solid3d sol = (Solid3d)tr.GetObject(myId, OpenMode.ForRead);
sol.StlOut(Path.Combine(targetDirectory, newFileName + ".stl"), true); //ignore facetres settings&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's possible to get a higher quality with that solid3d.stlout command?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You can try to P/Invoke &lt;EM&gt;&lt;STRONG&gt;AcDb3dSolid::stlOut(const ACHAR* fileName, &lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;Adesk::Boolean asciiFormat, double maxSurfaceDeviation = 0.0 /*use default*/) const;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;(available since AutoCAD 2015)&lt;/P&gt;</description>
      <pubDate>Sun, 20 Jun 2021 18:14:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10405918#M16021</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2021-06-20T18:14:43Z</dc:date>
    </item>
    <item>
      <title>Re: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407130#M16022</link>
      <description>&lt;P&gt;&lt;SPAN&gt;-&amp;gt; Are you sure??? yes i am.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;double originalfacetres = System.Convert.ToDouble(acApp.GetSystemVariable("FACETRES"));
ed.WriteMessage("FACETRES original value: " + originalfacetres.ToString() + "\n"); //result is 1

acApp.SetSystemVariable("FACETRES", 8);
double newfacetres = System.Convert.ToDouble(acApp.GetSystemVariable("FACETRES"));
ed.WriteMessage("FACETRES new value: " + newfacetres.ToString() + "\n"); //result is (still) 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-&amp;gt;&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;AcDb3dSolid&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;that's objectARX isn't it?&lt;/P&gt;&lt;P&gt;if this is the only way to do this i just give up at this point and live with this result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 08:30:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407130#M16022</guid>
      <dc:creator>stefan.hofer</dc:creator>
      <dc:date>2021-06-21T08:30:09Z</dc:date>
    </item>
    <item>
      <title>Betreff: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407297#M16023</link>
      <description>&lt;P&gt;Well i found a solution for the FACETRES problem&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;//Does not work
Autodesk.AutoCAD.ApplicationServices.Core.Application.SetSystemVariable("FACETRES", 8);

//This one work...
AcadDocument myDrawing = (AcadDocument)Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.MdiActiveDocument.GetAcadDocument();
myDrawing.SetVariable("FACETRES", 8);&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Jun 2021 09:48:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407297#M16023</guid>
      <dc:creator>stefan.hofer</dc:creator>
      <dc:date>2021-06-21T09:48:47Z</dc:date>
    </item>
    <item>
      <title>Betreff: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407353#M16024</link>
      <description>&lt;P&gt;okay this is a bit embarrassing but my first post was not entirely correct...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Solid3d.StlOut does not ignore the FACETRES value. I had a different problem.&lt;/P&gt;&lt;P&gt;The FACETRES variable is per drawing and not global.&lt;/P&gt;&lt;P&gt;(I create a new drawing for the export and had to change the variable in this new document and everything looks good now)&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 10:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407353#M16024</guid>
      <dc:creator>stefan.hofer</dc:creator>
      <dc:date>2021-06-21T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Betreff: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407373#M16025</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.Runtime;

// This line is not mandatory, but improves loading performances
[assembly: CommandClass(typeof(SetFacetRes.MyCommands))]

namespace SetFacetRes
{
  public class MyCommands
  {
    [CommandMethod("SetFacetRes")]
    public void MyCommand()
    {
      Document doc = Application.DocumentManager.MdiActiveDocument;
      Editor ed = doc.Editor;
      double fasetRes = (double) Application.GetSystemVariable("FACETRES");
      ed.WriteMessage("\nFacetRes={0}", fasetRes);
      Application.SetSystemVariable("FACETRES", 8);
      fasetRes = (double)Application.GetSystemVariable("FACETRES");
      ed.WriteMessage("\nFacetRes={0}", fasetRes);
    }
  }
}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="изображение.png" style="width: 860px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/932583i36A8277B7741FB0D/image-size/large?v=v2&amp;amp;px=999" role="button" title="изображение.png" alt="изображение.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What wrong? AutoCAD 2021.1.1&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 10:26:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407373#M16025</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2021-06-21T10:26:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407377#M16026</link>
      <description>&lt;P&gt;Other way for setting FACETRES is using &lt;STRONG&gt;&lt;EM&gt;Database.Facetres&lt;/EM&gt;&lt;/STRONG&gt; property.&lt;/P&gt;
&lt;DIV id="s3gt_translate_tooltip_mini" class="s3gt_translate_tooltip_mini_box" style="background: initial !important; border: initial !important; border-radius: initial !important; border-spacing: initial !important; border-collapse: initial !important; direction: ltr !important; flex-direction: initial !important; font-weight: initial !important; height: initial !important; letter-spacing: initial !important; min-width: initial !important; max-width: initial !important; min-height: initial !important; max-height: initial !important; margin: auto !important; outline: initial !important; padding: initial !important; position: absolute; table-layout: initial !important; text-align: initial !important; text-shadow: initial !important; width: initial !important; word-break: initial !important; word-spacing: initial !important; overflow-wrap: initial !important; box-sizing: initial !important; display: initial !important; color: inherit !important; font-size: 13px !important; font-family: X-LocaleSpecific, sans-serif, Tahoma, Helvetica !important; line-height: 13px !important; vertical-align: top !important; white-space: inherit !important; left: 457px; top: 35px; opacity: 0.5;"&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_logo" class="s3gt_translate_tooltip_mini" title="Перевести выделенный фрагмент"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_sound" class="s3gt_translate_tooltip_mini" title="Прослушать"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV id="s3gt_translate_tooltip_mini_copy" class="s3gt_translate_tooltip_mini" title="Скопировать текст в буфер обмена"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 21 Jun 2021 10:28:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407377#M16026</guid>
      <dc:creator>Alexander.Rivilis</dc:creator>
      <dc:date>2021-06-21T10:28:53Z</dc:date>
    </item>
    <item>
      <title>Betreff: Solid3d.StlOut with a better quality?</title>
      <link>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407461#M16027</link>
      <description>&lt;P&gt;&lt;SPAN&gt;-&amp;gt; Other way for setting FACETRES is using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Database.Facetres&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;property.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;don't forget the DocumentLock this way &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jun 2021 11:05:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/solid3d-stlout-with-a-better-quality/m-p/10407461#M16027</guid>
      <dc:creator>stefan.hofer</dc:creator>
      <dc:date>2021-06-21T11:05:26Z</dc:date>
    </item>
  </channel>
</rss>

