<?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: GetArcSegmentAt bug ? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167240#M75772</link>
    <description>If what you actually need is the 'exploded' Arc or Line equivalent of a polyline segment, it may be easier to use the GetSubEntity method. &lt;BR /&gt;
&lt;BR /&gt;
Here's a wrapper for it:&lt;BR /&gt;
&lt;BR /&gt;
public static class PolylineHelper&lt;BR /&gt;
{&lt;BR /&gt;
    public static Curve GetCurveAt( Polyline pline, int index )&lt;BR /&gt;
    {&lt;BR /&gt;
        return pline.GetSubentity(&lt;BR /&gt;
            new FullSubentityPath(&lt;BR /&gt;
                new ObjectId[] { pline.ObjectId },&lt;BR /&gt;
                new SubentityId( SubentityType.Edge, index + 1 ) ) );&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
/// usage:&lt;BR /&gt;
&lt;BR /&gt;
Polyline pline =      // the Polyline &lt;BR /&gt;
int index =            // 0-based index of segment to get&lt;BR /&gt;
&lt;BR /&gt;
Curve curve = PolylineHelper.GetCurveAt( pline, index );&lt;BR /&gt;
&lt;BR /&gt;
The resulting Curve will be an Arc or a Line, depending on if the segment at 'index' is curved or straight. You must call Dispose() on the resulting Curve once you're done using it, if you don't add it to the database.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BIKELINK&gt; wrote in message news:5833519@discussion.autodesk.com...&lt;BR /&gt;
I have a simple plyne-arc in my dwg..&lt;BR /&gt;
&lt;BR /&gt;
when I try to get the arc with this&lt;BR /&gt;
&lt;BR /&gt;
CircularArc3d a = this.MyPlyneArx.GetArcSegmentAt(0);&lt;BR /&gt;
&lt;BR /&gt;
a.StartAngle is always 0.0&lt;BR /&gt;
of course I  haven't  an angle zero...&lt;BR /&gt;
&lt;BR /&gt;
it's looks like it's give us the absolute angle between the vector v1 (p1 and center) and v2 (p2 center) with the first vector-ray on x Axis..&lt;BR /&gt;
&lt;BR /&gt;
when I draw the arc-plyne i Have a bulge...and 2 differents angles..(no one at zero..) and I don't understand why this &lt;BR /&gt;
"GetArcSegmentAt" give me a different arc..&lt;BR /&gt;
&lt;BR /&gt;
i go crazy...!&lt;/BIKELINK&gt;</description>
    <pubDate>Wed, 30 Jan 2008 11:42:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2008-01-30T11:42:24Z</dc:date>
    <item>
      <title>GetArcSegmentAt bug ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167237#M75769</link>
      <description>I have a simple plyne-arc in my dwg..&lt;BR /&gt;
&lt;BR /&gt;
when I try to get the arc with this&lt;BR /&gt;
&lt;BR /&gt;
CircularArc3d a = this.MyPlyneArx.GetArcSegmentAt(0);&lt;BR /&gt;
&lt;BR /&gt;
a.StartAngle is always 0.0&lt;BR /&gt;
of course I  haven't  an angle zero...&lt;BR /&gt;
&lt;BR /&gt;
it's looks like it's give us the absolute angle between the vector v1 (p1 and center) and v2 (p2 center) with the first vector-ray on x Axis..&lt;BR /&gt;
&lt;BR /&gt;
when I draw the arc-plyne i Have a bulge...and 2 differents angles..(no one at zero..) and I don't understand why this &lt;BR /&gt;
"GetArcSegmentAt" give me a different arc..&lt;BR /&gt;
&lt;BR /&gt;
i go crazy...!</description>
      <pubDate>Tue, 29 Jan 2008 22:51:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167237#M75769</guid>
      <dc:creator>bikelink</dc:creator>
      <dc:date>2008-01-29T22:51:41Z</dc:date>
    </item>
    <item>
      <title>Re: GetArcSegmentAt bug ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167238#M75770</link>
      <description>Check "Arc circArc2Arc(CircularArc3d circArc)"&lt;BR /&gt;
at&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/08/generating-koch.html</description>
      <pubDate>Wed, 30 Jan 2008 06:56:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167238#M75770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-30T06:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: GetArcSegmentAt bug ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167239#M75771</link>
      <description>thank you...that's a bug...</description>
      <pubDate>Wed, 30 Jan 2008 09:00:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167239#M75771</guid>
      <dc:creator>bikelink</dc:creator>
      <dc:date>2008-01-30T09:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: GetArcSegmentAt bug ?</title>
      <link>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167240#M75772</link>
      <description>If what you actually need is the 'exploded' Arc or Line equivalent of a polyline segment, it may be easier to use the GetSubEntity method. &lt;BR /&gt;
&lt;BR /&gt;
Here's a wrapper for it:&lt;BR /&gt;
&lt;BR /&gt;
public static class PolylineHelper&lt;BR /&gt;
{&lt;BR /&gt;
    public static Curve GetCurveAt( Polyline pline, int index )&lt;BR /&gt;
    {&lt;BR /&gt;
        return pline.GetSubentity(&lt;BR /&gt;
            new FullSubentityPath(&lt;BR /&gt;
                new ObjectId[] { pline.ObjectId },&lt;BR /&gt;
                new SubentityId( SubentityType.Edge, index + 1 ) ) );&lt;BR /&gt;
    }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
/// usage:&lt;BR /&gt;
&lt;BR /&gt;
Polyline pline =      // the Polyline &lt;BR /&gt;
int index =            // 0-based index of segment to get&lt;BR /&gt;
&lt;BR /&gt;
Curve curve = PolylineHelper.GetCurveAt( pline, index );&lt;BR /&gt;
&lt;BR /&gt;
The resulting Curve will be an Arc or a Line, depending on if the segment at 'index' is curved or straight. You must call Dispose() on the resulting Curve once you're done using it, if you don't add it to the database.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD 2008&lt;BR /&gt;
Supporting AutoCAD 2000 through 2008&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;BIKELINK&gt; wrote in message news:5833519@discussion.autodesk.com...&lt;BR /&gt;
I have a simple plyne-arc in my dwg..&lt;BR /&gt;
&lt;BR /&gt;
when I try to get the arc with this&lt;BR /&gt;
&lt;BR /&gt;
CircularArc3d a = this.MyPlyneArx.GetArcSegmentAt(0);&lt;BR /&gt;
&lt;BR /&gt;
a.StartAngle is always 0.0&lt;BR /&gt;
of course I  haven't  an angle zero...&lt;BR /&gt;
&lt;BR /&gt;
it's looks like it's give us the absolute angle between the vector v1 (p1 and center) and v2 (p2 center) with the first vector-ray on x Axis..&lt;BR /&gt;
&lt;BR /&gt;
when I draw the arc-plyne i Have a bulge...and 2 differents angles..(no one at zero..) and I don't understand why this &lt;BR /&gt;
"GetArcSegmentAt" give me a different arc..&lt;BR /&gt;
&lt;BR /&gt;
i go crazy...!&lt;/BIKELINK&gt;</description>
      <pubDate>Wed, 30 Jan 2008 11:42:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/getarcsegmentat-bug/m-p/2167240#M75772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-01-30T11:42:24Z</dc:date>
    </item>
  </channel>
</rss>

