Changing the number of points of a spline

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/03/2006 at 05:45, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.x 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;

---------
I already have a spline object in my document. Now, I would like to be able to add it or subtract it points (no matter their positions, that is already solved). So, for example, the spline has 5 control points but I would like to be able to change that at will, making it have, lets say 3 or 10 points, using COFFEE, of course. Possible? If yes, how?
Thank you in advance for any help.

Rui Batista

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/03/2006 at 06:06, xxxxxxxx wrote:

You can try MCOMMAND_SPLINE_ROUND with a SendModelingCommand()
-Sneaker

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/03/2006 at 08:14, xxxxxxxx wrote:

Thank you, Sneaker. It seems to work when I do it manually. But, when I try to code it in COFFEE, it can't pass the second line:

bc=new(BaseContainer);
bc->SetData(MDATA_SPLINE_ROUNDPOINTS,n_points);
bc->SetData(MDATA_SPLINE_ROUNDTYPE,1);

It tells me that "variable of function expected" at the place I have the n_points variable typed. It doesn't even work when I try to set it to a constant, like 10 or 20.
What could be wrong with such a simple code?

Rui Batista

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/03/2006 at 14:05, xxxxxxxx wrote:

There seems to be some missing constants.
That code worked here
bc->SetData(2015,99);
bc->SetData(2016,0);
SendModelingCommand(450000039,doc,op,bc,MODIFY_POINTSELECTION);
I found the values in coffeesymbols.h (ID_MODELING_SPLINE_ROUND_TOOL=450000039,)
and in toolsplineround.h
Don't ask me how I found that, but I'm quit good in guessing without understanding too much about that all ;o).
Edit:
Oh, yes and the minimum points seem to be 3.
hey, I'm glad I could help. You don't know how much I learned already from your tutorials and files.

all the best,
-Sneaker

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 10/03/2006 at 18:41, xxxxxxxx wrote:

Thank you VERY MUCH, Sneaker.
It worked fine!! 🙂

Rui Batista