<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[About polygons winding]]></title><description><![CDATA[<p dir="auto">Hello, as winding reversal for polygons having a negative area works in v2, I tried to do the same on the V1 scripts that I have on my website, but it isn't that easy.<br />
<img src="/assets/uploads/files/1600091482164-capture-d-%C3%A9cran-de-2020-09-14-15-45-29.png" alt="Capture d’écran de 2020-09-14 15-45-29.png" class=" img-responsive img-markdown" /> <img src="/assets/uploads/files/1600091482091-capture-d-%C3%A9cran-de-2020-09-14-15-45-51.png" alt="Capture d’écran de 2020-09-14 15-45-51.png" class=" img-responsive img-markdown" /></p>
<p dir="auto">I have a polyhedron with polygons having positive and negative areas, when reverse negative areas polygons, and display the volume, it has lots of missing faces , and surprisingly if I negate all polygons, it is correctly displayed. Maybe is my measureArea function wrong ? I took if from csg.js and adapt it ( vertices.. [0] changes to vertices... .pos.x  and so on). Seems that I'd better start to change my website to V2.</p>
]]></description><link>https://openjscad.nodebb.com/topic/156/about-polygons-winding</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Mar 2026 05:16:29 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/156.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Sep 2020 14:04:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to About polygons winding on Wed, 16 Sep 2020 17:33:47 GMT]]></title><description><![CDATA[<p dir="auto">I'm trying now csg on a .obj file imported (require) into V2. It works fine with an intersect, but when I try to make lots of intersect, the return statement has errors.<br />
<img src="/assets/uploads/files/1600244901822-capture-d-%C3%A9cran-de-2020-09-16-10-22-07-resized.png" alt="Capture d’écran de 2020-09-16 10-22-07.png" class=" img-responsive img-markdown" /><br />
On my example, height is 104 units, I can return a slice every 3 units, but when I try to return a slice every 2 units (and my real process needs smaller slices) it bugs :</p>
<p dir="auto">elapse for solid generation: 39 design.js<br />
total time for design regeneration 7015 17 design.js<br />
Uncaught (in promise) TypeError: a is undefined (2 times)</p>
]]></description><link>https://openjscad.nodebb.com/post/369</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/369</guid><dc:creator><![CDATA[gilboonet]]></dc:creator><pubDate>Wed, 16 Sep 2020 17:33:47 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Wed, 16 Sep 2020 06:48:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/1">@z3dev</a> Indeed, for those examples I didn't use serializer but import data from obj files exported to .jscad format by Wings 3d. When imported on V2 using require (I suppose that's the way to use serializer), it's visually correct. I will try to do some csg to see if it ok. Anyway, here are the files.<br />
<a href="https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/objs.zip" rel="nofollow ugc">https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/objs.zip</a></p>
]]></description><link>https://openjscad.nodebb.com/post/368</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/368</guid><dc:creator><![CDATA[gilboonet]]></dc:creator><pubDate>Wed, 16 Sep 2020 06:48:30 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Tue, 15 Sep 2020 23:34:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/5">@gilboonet</a> thanks for investigating further.</p>
<p dir="auto">There may be some issues with the OBJ deserializer. Can you attach the OBJ files?<br />
I'd like to make sure this functionality is working well at least.</p>
]]></description><link>https://openjscad.nodebb.com/post/366</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/366</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Tue, 15 Sep 2020 23:34:14 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Tue, 15 Sep 2020 13:59:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/1">@z3dev</a> The same data applied to V2 gives the same results, the visually correct polyhedra are those having faces order reversed.<br />
<img src="/assets/uploads/files/1600178363416-capture-d-%C3%A9cran-de-2020-09-15-15-56-27.png" alt="Capture d’écran de 2020-09-15 15-56-27.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://openjscad.nodebb.com/post/365</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/365</guid><dc:creator><![CDATA[gilboonet]]></dc:creator><pubDate>Tue, 15 Sep 2020 13:59:29 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Tue, 15 Sep 2020 10:03:08 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/1">@z3dev</a> I'm making some tests, apparently, with V1 specifying orientation doesn't correct the issue. With two differents obj files, I tried 4 kinds of polyhedron :</p>
<ul>
<li>orientation 'inward', faces order unchanged</li>
<li>orientation 'outward', faces order unchanged</li>
<li>orientation 'inward', faces order reversed</li>
<li>orientation 'outward', faces order reversed</li>
</ul>
<p dir="auto">and the only ones that work (visually) are those with faces order reversed. I will try to do some CSG on them to see it deeper. And I will do the same with v2 asap, one thing I can say about v2 is that it measureArea returns 0 for 3d polygons, and work than I make them 2d.<br />
<img src="/assets/uploads/files/1600164055158-capture-d-%C3%A9cran-de-2020-09-15-11-25-32.png" alt="Capture d’écran de 2020-09-15 11-25-32.png" class=" img-responsive img-markdown" /> <img src="/assets/uploads/files/1600164055396-capture-d-%C3%A9cran-de-2020-09-15-11-55-50.png" alt="Capture d’écran de 2020-09-15 11-55-50.png" class=" img-responsive img-markdown" /></p>
]]></description><link>https://openjscad.nodebb.com/post/360</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/360</guid><dc:creator><![CDATA[gilboonet]]></dc:creator><pubDate>Tue, 15 Sep 2020 10:03:08 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Tue, 15 Sep 2020 01:02:57 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/5">@gilboonet</a> there's a slight difference in the polyhedron() function of V1 versus V2.</p>
<p dir="auto">in V1, the <strong>global</strong> polyhedron() function expects polygons which have the normals facing 'inward', which is the OpenSCAD convention.</p>
<p dir="auto">in V2, the polyhedron() function can accept either 'outward' or 'inward' facing polygons. By default the polygons are expected to face 'outward'.</p>
<pre><code>const shape = polyhedron({orientation: 'outward', points: vertices, ...})
</code></pre>
<p dir="auto">Is this the issue?</p>
]]></description><link>https://openjscad.nodebb.com/post/359</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/359</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Tue, 15 Sep 2020 01:02:57 GMT</pubDate></item><item><title><![CDATA[Reply to About polygons winding on Mon, 14 Sep 2020 23:51:10 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="https://openjscad.nodebb.com/uid/5">@gilboonet</a> interesting.</p>
<p dir="auto">are the set of points and triangles always the same? V1 version versus V2 version?</p>
]]></description><link>https://openjscad.nodebb.com/post/358</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/358</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Mon, 14 Sep 2020 23:51:10 GMT</pubDate></item></channel></rss>