.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

spline to pline API ?

4 REPLIES 4
Reply
Message 1 of 5
bikelink
917 Views, 4 Replies

spline to pline API ?

i'm looking for the api to convert a spline to pline (autocad 2010 can do it with convert)

I hope exists also an api that we call to make it..

any idea ?

thanks in advance!

4 REPLIES 4
Message 2 of 5
SEANT61
in reply to: bikelink

There is the Spline.ToPolylineWithPrecision Method.

 


************************************************************
May your cursor always snap to the location intended.
Message 3 of 5
bikelink
in reply to: bikelink

ok, for previous version this is not available.. some work around to make it possible also with 2009 ?

Message 4 of 5
SEANT61
in reply to: bikelink

How do you intend to recreate the path?  I suppose recreating the Spline’s path with arcs would be a bit difficult – short line segments, however, should be fairly easy.  If the spline’s total parameter (Interval)  were divide by the appropriate amount:

 

Double seg = (Spline.EndParam – Spline.StartParam) / 100;

 

For example, then a for loop could find successive position with Spline.GetPointAtParameter.  One characteristic of Splines is that the Interval naturally compresses at areas of high curvature so the chord height is kept to a minimal.


************************************************************
May your cursor always snap to the location intended.
Message 5 of 5
Jeffrey_H
in reply to: SEANT61

Are you wanting to convert to a polyline to get a tighter bounding box?

 

If so like SEANT61 suggested  just add to check  the X and Y value and update some variable's value for X and Y min max value

You can also find your answers @ TheSwamp

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost