<?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: Help with Offset Line in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624288#M67329</link>
    <description>If all you need is Startpoint/Endpoint, then you can cast them to Curve.&lt;BR /&gt;
&lt;BR /&gt;
In VB you can just set a variable declared as Curve = to the DBObject&lt;BR /&gt;
&lt;BR /&gt;
For Each crv as Curve in offobjs&lt;BR /&gt;
p1 = crv.StartPoint&lt;BR /&gt;
...etc.&lt;BR /&gt;
Next&lt;BR /&gt;
&lt;BR /&gt;
If you need a parameter that is specific to the object type, like the radius of an arc, for instance, then you have to cast it to the right object type.</description>
    <pubDate>Mon, 01 Feb 2010 18:38:21 GMT</pubDate>
    <dc:creator>chiefbraincloud</dc:creator>
    <dc:date>2010-02-01T18:38:21Z</dc:date>
    <item>
      <title>Help with Offset Line</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624285#M67326</link>
      <description>Hello,&lt;BR /&gt;
&lt;BR /&gt;
I'm fairly new to AutoCAD.NET programming (about 1 year) and need some help.&lt;BR /&gt;
&lt;BR /&gt;
I have created a command that will draw two arcs (one is a clone of the &lt;BR /&gt;
other) and then it draws a line from each starting point, then another line &lt;BR /&gt;
from each ending point, basicly closing the object.&lt;BR /&gt;
&lt;BR /&gt;
What I would like to do know is offset the lines a specified distance via &lt;BR /&gt;
user input. I can get the user specified distance, but cannot figure out how &lt;BR /&gt;
to offest the lines.&lt;BR /&gt;
&lt;BR /&gt;
Any help would be greatly appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
James Walker</description>
      <pubDate>Fri, 29 Jan 2010 14:32:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624285#M67326</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-29T14:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Offset Line</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624286#M67327</link>
      <description>Dim offobjs As DBObjectCollection&lt;BR /&gt;
offobjs = poly.GetOffsetCurves(-1 * Dist)&lt;BR /&gt;
&lt;BR /&gt;
In my case poly is a Polyline of course, but the GetOffsetCurves function is available to all objects that derive from Curve, which includes arcs and lines.&lt;BR /&gt;
&lt;BR /&gt;
The trick is to figure out whether to make the distance parameter positive or negative.  This is from the ARX help file.  &lt;BR /&gt;
&lt;BR /&gt;
This function creates one or more entities that together make up the result of offsetting the curve by the distance offsetDist. For many curves, the result is a single new curve. (This single new curve may not be of the same class as the original curve. For example, offsetting an AcDbEllipse results in an AcDbSpline, since the result of offsetting an ellipse does NOT fit the equation of an ellipse.) &lt;BR /&gt;
&lt;BR /&gt;
...........&lt;BR /&gt;
&lt;BR /&gt;
If the offsetDist value is negative, it is usually interpreted as being an offset to make a smaller curve (that is, for an arc it would offset to a radius that is offsetDist less than the starting curve's radius). If the negative value has no meaning in terms of making the curve smaller, a negative offsetDist may be interpreted as an offset in the direction of smaller X,Y,Z WCS coordinates. This is not enforced, so custom entities can interpret the sign of the offsetDist value however they want. &lt;BR /&gt;
&lt;BR /&gt;
The entities returned in the offsetCurves array are dynamically allocated, but have not been added to a Database yet. So, the application that calls this function is responsible for their memory. If they are subsequently appended to a database, then the database takes over responsibility for their memory. Otherwise, the application is responsible for deleting them when they are no longer needed.</description>
      <pubDate>Fri, 29 Jan 2010 22:01:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624286#M67327</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2010-01-29T22:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Offset Line</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624287#M67328</link>
      <description>Thanks for helping with the offset, I have that working.&lt;BR /&gt;
&lt;BR /&gt;
Would like to know if there is a way to "convert" the offset line in the &lt;BR /&gt;
DBObjectCollection into a Line? This way I could use the .StartPoint or &lt;BR /&gt;
.EndPoint to draw lines to or frome the newly offset line.&lt;BR /&gt;
&lt;BR /&gt;
James Walker&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"chiefbraincloud" wrote in message news:6327325@discussion.autodesk.com...&lt;BR /&gt;
Dim offobjs As DBObjectCollection&lt;BR /&gt;
offobjs = poly.GetOffsetCurves(-1 * Dist)&lt;BR /&gt;
&lt;BR /&gt;
In my case poly is a Polyline of course, but the GetOffsetCurves function is &lt;BR /&gt;
available to all objects that derive from Curve, which includes arcs and &lt;BR /&gt;
lines.&lt;BR /&gt;
&lt;BR /&gt;
The trick is to figure out whether to make the distance parameter positive &lt;BR /&gt;
or negative.  This is from the ARX help file.&lt;BR /&gt;
&lt;BR /&gt;
This function creates one or more entities that together make up the result &lt;BR /&gt;
of offsetting the curve by the distance offsetDist. For many curves, the &lt;BR /&gt;
result is a single new curve. (This single new curve may not be of the same &lt;BR /&gt;
class as the original curve. For example, offsetting an AcDbEllipse results &lt;BR /&gt;
in an AcDbSpline, since the result of offsetting an ellipse does NOT fit the &lt;BR /&gt;
equation of an ellipse.)&lt;BR /&gt;
&lt;BR /&gt;
...........&lt;BR /&gt;
&lt;BR /&gt;
If the offsetDist value is negative, it is usually interpreted as being an &lt;BR /&gt;
offset to make a smaller curve (that is, for an arc it would offset to a &lt;BR /&gt;
radius that is offsetDist less than the starting curve's radius). If the &lt;BR /&gt;
negative value has no meaning in terms of making the curve smaller, a &lt;BR /&gt;
negative offsetDist may be interpreted as an offset in the direction of &lt;BR /&gt;
smaller X,Y,Z WCS coordinates. This is not enforced, so custom entities can &lt;BR /&gt;
interpret the sign of the offsetDist value however they want.&lt;BR /&gt;
&lt;BR /&gt;
The entities returned in the offsetCurves array are dynamically allocated, &lt;BR /&gt;
but have not been added to a Database yet. So, the application that calls &lt;BR /&gt;
this function is responsible for their memory. If they are subsequently &lt;BR /&gt;
appended to a database, then the database takes over responsibility for &lt;BR /&gt;
their memory. Otherwise, the application is responsible for deleting them &lt;BR /&gt;
when they are no longer needed.</description>
      <pubDate>Mon, 01 Feb 2010 15:34:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624287#M67328</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-01T15:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Offset Line</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624288#M67329</link>
      <description>If all you need is Startpoint/Endpoint, then you can cast them to Curve.&lt;BR /&gt;
&lt;BR /&gt;
In VB you can just set a variable declared as Curve = to the DBObject&lt;BR /&gt;
&lt;BR /&gt;
For Each crv as Curve in offobjs&lt;BR /&gt;
p1 = crv.StartPoint&lt;BR /&gt;
...etc.&lt;BR /&gt;
Next&lt;BR /&gt;
&lt;BR /&gt;
If you need a parameter that is specific to the object type, like the radius of an arc, for instance, then you have to cast it to the right object type.</description>
      <pubDate>Mon, 01 Feb 2010 18:38:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624288#M67329</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2010-02-01T18:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Offset Line</title>
      <link>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624289#M67330</link>
      <description>There it goes duplicate posting again...&lt;BR /&gt;
Edited by: chiefbraincloud on Feb 1, 2010 11:38 AM</description>
      <pubDate>Mon, 01 Feb 2010 18:38:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/help-with-offset-line/m-p/2624289#M67330</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2010-02-01T18:38:22Z</dc:date>
    </item>
  </channel>
</rss>

