Page 1 of 1

Get X-Y points of spline

Posted: 21 Mar 2013, 17:47
by Sergey_Z
Hi,
I trying to load a spline and read some points on it's surface.
I set NumberOfPartsInSpline to 1000

Code: Select all

     vImg = dynamic_cast<TsgDXFImage *>(Image1->Picture->Graphic);          
     vImg->Converter->NumberOfPartsInSpline=1000;
After this you call ReadCADEntities in your example and it calls ImportSpline().

Code: Select all

void __fastcall TForm1::ImportSpline(TObject *Sender)
{
         int I;
         TFPoint P;
         TsgDXFVertex *Vertex;
         TsgDXFSpline *vSpline = (TsgDXFSpline *)Sender;
         if (vSpline->FitCount() > 0)
         {
         }
vSpline->FitCount() returns allways zero
Why NumberOfPartsInSpline doesn't incrace number of points?
How can I calculate some points on spline having control points?
Thank you,
Sergey.

Re: Get X-Y points of spline

Posted: 21 Mar 2013, 18:44
by Sergey_Z
Ok, I founded it it was DottedSingPts,
but I still cann't understand, how can I do it by myself without DottedSingPts.
Is there any formula to get/build points on spline?

Re: Get X-Y points of spline

Posted: 22 Mar 2013, 18:58
by support
Hello Sergey.
DottedSingPts is the result of internal handling of spline. Since this property can be accessed and quantity of points affected, we have no any reasons to show the algorithms. If you have a license for the library and any concerns to not use DottedSingPts then please contact us via support@cadsofttools.com.

Alexander.