Access to intermediate points

On 01/03/2013 at 19:30, xxxxxxxx wrote:

Hello everybody,

is it possible to get access to intermediate points of splines? Id like to round corners.

Thanks and greetings

On 02/03/2013 at 00:12, xxxxxxxx wrote:

Look at SplineObject.GetSplinePoint().


On 02/03/2013 at 01:58, xxxxxxxx wrote:

Originally posted by xxxxxxxx

Look at SplineObject.GetSplinePoint().

first of all, i am not sure how intermediate points is meant to be red, i am reading
it as interpolation subpoints/steps.

i am also not sure if i am missing here something, but GetSplinePoint does not give 
you access to the spline interpolation points, but just translates an 0-1 based offset
along the spline into an vector at that point in object coordinates. To my knowledge 
there is no (python) method which returns a splines interpolation subpoints.

For any sort of chamfering you will have to add support points to the spline object,
just like you would do it in the editor too. You could do this either by executing a 
SMC Chamfer command on a programmatically created BaseSelect of your SplineObject 
or by adding manually points to your PointObject (the class both polygon and spline 
objects are being derived from).

On 02/03/2013 at 02:14, xxxxxxxx wrote:

Hi Ferdinand,

I understood "intermediate points" as "any points of the spline that are not necessarily anchor
points", like the ones you can find by using GetPoint().


On 02/03/2013 at 04:33, xxxxxxxx wrote:

If you want to get your hands on the spline points that result from the interpolation, you have to convert the spline using the modeling command MCOMMAND_CURRENTSTATETOOBJECT. This will give you a linear spline that contains all the interpolated points.

On 04/03/2013 at 04:41, xxxxxxxx wrote:

Hello you three,

Im back. Thanks for replies and sorry for vague wording.
Indeed I meant access to interpolation subpoints. So the question is how to create an own interpolation. Id like to write a plugin for rounding corners of linear splines. I know how to calcuate the right positions, but I have no idea how to draw the Spline along these right positions.

Thank and greetings

On 04/03/2013 at 04:53, xxxxxxxx wrote:

Just to be clear: You want to calculate the interpolation on your own?
If so, google for bezier, b-spline or cubic spline interpolation. You may also
want to look at the pycurves module.


On 04/03/2013 at 10:38, xxxxxxxx wrote:

to get hold of the spline interpolation use CSTO as Jack suggested, which will convert the

interpolation points into control points. but accessing the interpolation points does not make
any sense for chamfering a spline. simply use the methods described above to add control