Hi there,
At the moment we are using QCAD Pro (latest version). We developed a calc engine, which create entities in python code, and then compile it to DXF file using QCAD.
We have a problem with spline. Since, in python code, we use interpolation from scipy package.
http://docs.scipy.org/doc/scipy/referen ... olate.html
http://docs.scipy.org/doc/scipy/referen ... nterpolate
The problem is it doesn't give us the correct spline that appears in qcad. So, what's the algorithm did you use to build that spline?
Thank you very much!
Qcad's Spline algorithm
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files, scripts and screenshots.
Post one question per topic.
Re: Qcad's Spline algorithm
I assume you are referring to splines created from fit points (points that are on the spline curve).
There are various different algorithms for spline fitting. QCAD Professional uses the Teigha libraries to do the spline fitting exactly in the same way as Autocad and compatible products do it. I honestly do not know what kind of algorithm Teigha or Autocad use internally. But perhaps this is a new lead to follow..
There are various different algorithms for spline fitting. QCAD Professional uses the Teigha libraries to do the spline fitting exactly in the same way as Autocad and compatible products do it. I honestly do not know what kind of algorithm Teigha or Autocad use internally. But perhaps this is a new lead to follow..
Re: Qcad's Spline algorithm
Hi Andrew,
Thanks for reply. Does that Teigha Libraries support us to calculate the length of spline and give exactly answer as qcad does?
Thanks for reply. Does that Teigha Libraries support us to calculate the length of spline and give exactly answer as qcad does?
Re: Qcad's Spline algorithm
You can use RSpline::getLength() to get the approximate length of the spline (based on interpolation).