<?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 Re: pRegion-&amp;gt;getAreaProp() in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4307757#M13574</link>
    <description>&lt;P&gt;Origin is -50.1250, 76.0000, 0.0000 (it's the first point of the 3Dpoly that i created before it's turned into a region)&lt;BR /&gt;xAxis&amp;nbsp; is 1.0000, 0.0000, 0.0000&lt;BR /&gt;yAxis&amp;nbsp; is 0.0000, 1.0000, 0.0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function is attached as .txt file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 24 Jun 2013 17:07:01 GMT</pubDate>
    <dc:creator>EMD1954</dc:creator>
    <dc:date>2013-06-24T17:07:01Z</dc:date>
    <item>
      <title>pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4300741#M13572</link>
      <description>&lt;P&gt;I want to let the user draw a complicated, 2D polyline, select it, and have it convert to a region so I can use the mass properties for a handful of tasks.&amp;nbsp; I've gotten to the point (following the samples) where I am able to create the region using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;es = AcDbRegion::createFromCurves(curveSegs, regions);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;AcDbRegion *pRegion;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;pRegion =&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;&lt;FONT color="#0000ff" size="2"&gt;static_cast&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;FONT size="2"&gt;&amp;lt;AcDbRegion*&amp;gt;(regions[0]);&amp;nbsp; // I only have one element to pick&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pRegion-&amp;gt;getPlane&lt;FONT face="arial,helvetica,sans-serif"&gt;(plane&lt;/FONT&gt;);&lt;/P&gt;&lt;P&gt;plane.getCoordSystem(origin, xAxis, yAxis);&lt;/P&gt;&lt;P&gt;es = pRegion-&amp;gt;getAreaProp(origin, xAxis, yAxis, perimeter, area, centroid, momInertia,&lt;/P&gt;&lt;P&gt;prodInertia, prinMoments, prinAxes, radiiGyration, extentsLow, extentsHigh);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I save it to the database.&amp;nbsp; It works fine up to this point, but I get the wrong centroid (and different than the command line "MASSPROP")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anything obvious?&amp;nbsp; Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2013 20:26:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4300741#M13572</guid>
      <dc:creator>EMD1954</dc:creator>
      <dc:date>2013-06-17T20:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4300924#M13573</link>
      <description>&lt;P&gt;What are the actual values that you're passing for the origin, xAxis, and yAxis arguments to getAreaProp()?&amp;nbsp;Perhaps the MASSPROP command&amp;nbsp;uses the UCS instead of the World coordinate system.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2013 01:59:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4300924#M13573</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2013-06-18T01:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4307757#M13574</link>
      <description>&lt;P&gt;Origin is -50.1250, 76.0000, 0.0000 (it's the first point of the 3Dpoly that i created before it's turned into a region)&lt;BR /&gt;xAxis&amp;nbsp; is 1.0000, 0.0000, 0.0000&lt;BR /&gt;yAxis&amp;nbsp; is 0.0000, 1.0000, 0.0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Function is attached as .txt file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 17:07:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4307757#M13574</guid>
      <dc:creator>EMD1954</dc:creator>
      <dc:date>2013-06-24T17:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308119#M13575</link>
      <description>&lt;P&gt;Try the&amp;nbsp;WCS or UCS, then compare the results to MASSPROP.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jun 2013 23:57:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308119#M13575</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2013-06-24T23:57:43Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308534#M13576</link>
      <description>&lt;P&gt;Sorry for the trouble, but I don't understand.&amp;nbsp; I tried it in the "world" UCS, changed the view and set the UCS to "View" and even tried to set the UCS to "element".&amp;nbsp; What do you mean?&amp;nbsp; Sorry.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 13:16:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308534#M13576</guid>
      <dc:creator>EMD1954</dc:creator>
      <dc:date>2013-06-25T13:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308618#M13577</link>
      <description>&lt;P&gt;I am referring to the first three arguments to getAreaProp(). For example, the WCS would be:&lt;/P&gt;&lt;BLOCKQUOTE&gt;pRegion-&amp;gt;getAreaProp(AcGePoint3d(0,0,0), AcGeVector3d(1,0,0), AcGeVector3d(0,1,0), ...);&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 25 Jun 2013 14:13:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308618#M13577</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2013-06-25T14:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: pRegion-&gt;getAreaProp()</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308905#M13578</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; The problem was that "origin" was returning the first point of the original polyline, so I just&amp;nbsp;zeroed the X and Y coordinates (I need Z for the proper elevation).&amp;nbsp; The xAxis and yAxis were correct:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pRegion-&amp;gt;getPlane(plane);&lt;/P&gt;&lt;P&gt;plane.getCoordSystem(origin, xAxis, yAxis);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;origin.x = 0.0;&lt;/P&gt;&lt;P&gt;origin.y = 0,0;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works great - thank you,&lt;/P&gt;&lt;P&gt;Ed&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2013 17:27:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/pregion-gt-getareaprop/m-p/4308905#M13578</guid>
      <dc:creator>EMD1954</dc:creator>
      <dc:date>2013-06-25T17:27:11Z</dc:date>
    </item>
  </channel>
</rss>

