Hello and welcome to the forum,
For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here.
Q&A New Functionality.
How to Post Questions especially the tagging part.
I've added marked this thread as a question so when you considered it as solved, please change the state 🙂
In your code you Resize the object after initialized for the modeling command. That's why.
but probably a simpler way to achieve what you want is to access the polygon's data. The PolygonObject is inherit from PointObject where you can retrieve the pointer of the points' vectors with GetPointW
sometthing like so will work
Vector* padr{ pol->GetPointW() };
if (padr == nullptr)
return maxon::NullptrError(MAXON_SOURCE_LOCATION);
padr[3] = Vector(-2, 0, 0);
You can have a look at our "roundtube" example in the sdk.zip file that ship with every Cinema 4D version. This example will show you how to create a primitive from scratch.
Cheers,
Manuel.