<?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[3d points of coplanar polygons - SketchUp Ruby API]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have a question, how could I draw a coplanar polygon with the next<br />
3d points?<br />
<strong>[27.096141893, 67.088581299, 10.979694884][13.548070946,<br />
62.423606365, 20.5321749][27.258347158, 22.606073055, 20.5321749]<br />
[40.806418104, 27.271047989, 10.979694884]</strong> that are the points of<br />
a polygon of a roof.</p>
<p dir="auto">I have the next polygon with the points <strong>[27.096141893,67.088581299,10.979694884]<br />
[13.548070946,62.423606365,20.532174900]<br />
[13.548070946,62.423606365,20.532174900]<br />
[27.258347158,22.606073055,20.532174900]<br />
[27.258347158,22.606073055,20.532174900]<br />
[40.806418104,27.271047989,10.979694884]<br />
[40.806418104,27.271047989,10.979694884]<br />
[27.096141893,67.088581299,10.979694884]</strong> and orientation of<br />
<strong>71.0</strong> how could I draw the polygon according the orientation.</p>
<p dir="auto">Thank you very much.</p>
]]></description><link>https://community.sketchucation.com/topic/134310/3d-points-of-coplanar-polygons-sketchup-ruby-api</link><generator>RSS for Node</generator><lastBuildDate>Thu, 14 May 2026 04:14:18 GMT</lastBuildDate><atom:link href="https://community.sketchucation.com/topic/134310.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 07 Apr 2012 17:26:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 3d points of coplanar polygons - SketchUp Ruby API on Fri, 20 Apr 2012 16:35:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdmitch" aria-label="Profile: sdmitch">@<bdi>sdmitch</bdi></a> said:</p>
<blockquote>
<p dir="auto">vhiguita, Are you still working on this problem or do you have a solution?  I was interested in your problem and thought I would give it a try.  Using the data from you post, I created a "html" file and created a plugin to read it and place the data.  My html file contains the faces, lines and points but the lines and points are really the only data you need.  I assummed the units were feet.  It would help if I had an actual file to work with so post one if possible.</p>
</blockquote>
<p dir="auto">Hi, I found the solution, there are many ways to get this, for example with PHP you could load all the html to a string, you could apply regular expressions to get the values (&lt;div&gt;,&lt;span&gt;, etc) from the tags review curl library.</p>
]]></description><link>https://community.sketchucation.com/post/1323178</link><guid isPermaLink="true">https://community.sketchucation.com/post/1323178</guid><dc:creator><![CDATA[vhiguita]]></dc:creator><pubDate>Fri, 20 Apr 2012 16:35:13 GMT</pubDate></item><item><title><![CDATA[Reply to 3d points of coplanar polygons - SketchUp Ruby API on Wed, 11 Apr 2012 21:54:40 GMT]]></title><description><![CDATA[<p dir="auto">vhiguita, Are you still working on this problem or do you have a solution?  I was interested in your problem and thought I would give it a try.  Using the data from you post, I created a "html" file and created a plugin to read it and place the data.  My html file contains the faces, lines and points but the lines and points are really the only data you need.  I assummed the units were feet.  It would help if I had an actual file to work with so post one if possible.</p>
]]></description><link>https://community.sketchucation.com/post/1321333</link><guid isPermaLink="true">https://community.sketchucation.com/post/1321333</guid><dc:creator><![CDATA[sdmitch]]></dc:creator><pubDate>Wed, 11 Apr 2012 21:54:40 GMT</pubDate></item><item><title><![CDATA[Reply to 3d points of coplanar polygons - SketchUp Ruby API on Sun, 08 Apr 2012 09:39:09 GMT]]></title><description><![CDATA[<p dir="auto">The three points [p1/p2/p3] must all be different points in space, note that also they cannot be colinear - because three points in a straight line can't form a face!  Otherwise any other three different points must be coplanar and will always 'face'...  These points form the vertices of the face and Sketchup forms edges between them to suit.<br />
You can have more than three points passed to .add_face()... BUT they must all be properly coplanar, which is not guaranteed, unless of course you are sure that they are from prior knowledge, or perhaps all of these new points share a common coordinate, in say the Z, which will ensure they're coplanar...</p>
<p dir="auto">Looking at the XML code you supplied it is possible to see it defining several XYZ points [C2/C3 etc], these points are used to form lines [edges] {L1/L2 etc} describing different roof planes.<br />
It will need very intense parsing of the text to extract the points and the lines etc.<br />
Beyond you, I suspect - experienced scripters would be wary...</p>
]]></description><link>https://community.sketchucation.com/post/1320581</link><guid isPermaLink="true">https://community.sketchucation.com/post/1320581</guid><dc:creator><![CDATA[TIG]]></dc:creator><pubDate>Sun, 08 Apr 2012 09:39:09 GMT</pubDate></item><item><title><![CDATA[Reply to 3d points of coplanar polygons - SketchUp Ruby API on Sat, 07 Apr 2012 20:32:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">In this instruction <strong>Sketchup.active_model.active_entities.add_face(p1,p2,p3)</strong>.<br />
Must the p1, p2, p3 points be different (not repeated)?<br />
With respect to the orientation, it´s a xml file with some data of a house roof I need to draw with SketchUP ruby API, what could it mean?.</p>
<p dir="auto">Thanks.</p>
<p dir="auto">&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
-&lt;EAGLEVIEW_EXPORT xsi:noNamespaceSchemaLocationreportName="file:///c:/temp/eagleview-export.xsd" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.w3.org/2001/XMLSchema-instance</a>"&gt; &lt;VERSION triangulation="" targetVersion="0" sourceVersion="1028" precisionUnits="" precision="0" dormers="" coplanarity=""/&gt; &lt;LOCATION state="CA" postal="" long="-122.0241000" lat="36.9821000" city="Santa Cruz" address="141 Kennan St"/&gt; -&lt;STRUCTURES northorientation="0.0"&gt; -&lt;ROOF id="ROOF1"&gt; -&lt;FACES&gt; -&lt;FACE id="F1" designator="I"&gt; &lt;POLYGON id="P1" unroundedsize="725.207196199" size="725" pitch="8" path="L1,L2,L3,L4" orientation="71.0"/&gt; &lt;/FACE&gt;<br />
-&lt;FACE id="F2" designator="H"&gt; &lt;POLYGON id="P2" unroundedsize="725.207196199" size="725" pitch="8" path="L2,L5,L6,L7" orientation="251.0"/&gt; &lt;/FACE&gt; -&lt;FACE id="F3" designator="A"&gt; &lt;POLYGON id="P3" unroundedsize="14.215955537" size="14" pitch="6" path="L8,L9,L10,L11" orientation="341.0"/&gt; &lt;/FACE&gt; -&lt;FACE id="F4" designator="B"&gt; &lt;POLYGON id="P4" unroundedsize="18.105641666" size="18" pitch="8" path="L11,L12,L13" orientation="23.5"/&gt; &lt;/FACE&gt;<br />
....<br />
&lt;/FACES&gt;<br />
-&lt;LINES&gt; &lt;LINE id="L1" path="C1,C2" type="RAKE"/&gt; &lt;LINE id="L2" path="C2,C3" type="RIDGE"/&gt; &lt;LINE id="L3" path="C3,C4" type="RAKE"/&gt; &lt;LINE id="L4" path="C4,C1" type="EAVE"/&gt; &lt;LINE id="L5" path="C2,C5" type="RAKE"/&gt; &lt;LINE id="L6" path="C5,C6" type="EAVE"/&gt; &lt;LINE id="L7" path="C6,C3" type="RAKE"/&gt; &lt;LINE id="L8" path="C7,C8" type="EAVE"/&gt;<br />
...<br />
&lt;/LINES&gt;<br />
-&lt;POINTS&gt; &lt;POINT id="C1" data="27.096141893,67.088581299,10.979694884"/&gt; &lt;POINT id="C2" data="13.548070946,62.423606365,20.532174900"/&gt; &lt;POINT id="C3" data="27.258347158,22.606073055,20.532174900"/&gt; &lt;POINT id="C4" data="40.806418104,27.271047989,10.979694884"/&gt; &lt;POINT id="C5" data="0.000000000,57.758631431,10.979694884"/&gt; &lt;POINT id="C6" data="13.710276212,17.941098122,10.979694884"/&gt; &lt;POINT id="C7" data="9.278743999,64.672471378,3.493539281"/&gt; &lt;POINT id="C8" data="6.784562011,63.813655647,3.493539281"/&gt; &lt;POINT id="C9" data="8.502105093,59.116949751,5.993539281"/&gt;<br />
...<br />
&lt;/POINTS&gt; &lt;/ROOF&gt; &lt;/STRUCTURES&gt; &lt;/EAGLEVIEW_EXPORT&gt;<br />
L1</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tig" aria-label="Profile: tig">@<bdi>tig</bdi></a> said:</p>
<blockquote>
<p dir="auto">If you have three points they will always be 'coplanar'.<br />
Let's call them p1/p2/p3;<br />
To add the face use:<br />
<code> Sketchup.active_model.active_entities.add_face(p1,p2,p3)</code><br />
You can use more points BUT you must be sure that they are coplanar.</p>
<p dir="auto">What do you mean by the orientation of 71 ?</p>
<p dir="auto">PS: Don't double post - be patient - I moved the post here too...</p>
</blockquote>
]]></description><link>https://community.sketchucation.com/post/1320522</link><guid isPermaLink="true">https://community.sketchucation.com/post/1320522</guid><dc:creator><![CDATA[vhiguita]]></dc:creator><pubDate>Sat, 07 Apr 2012 20:32:28 GMT</pubDate></item><item><title><![CDATA[Reply to 3d points of coplanar polygons - SketchUp Ruby API on Sat, 07 Apr 2012 18:47:03 GMT]]></title><description><![CDATA[<p dir="auto">If you have three points they will always be 'coplanar'.<br />
Let's call them p1/p2/p3;<br />
To add the face use:<br />
<code> Sketchup.active_model.active_entities.add_face(p1,p2,p3)</code><br />
You can use more points BUT you must be sure that they are coplanar.</p>
<p dir="auto">What do you mean by the orientation of 71 ?</p>
<p dir="auto">PS: Don't double post - be patient - I moved the post here too...</p>
]]></description><link>https://community.sketchucation.com/post/1320514</link><guid isPermaLink="true">https://community.sketchucation.com/post/1320514</guid><dc:creator><![CDATA[TIG]]></dc:creator><pubDate>Sat, 07 Apr 2012 18:47:03 GMT</pubDate></item></channel></rss>