RhinoRevolve 360 revolution for polyline


I am trying to create a command for curve revolution with RhinoRevolve.
This is the part relative to the 360revolution:

const ON_Curve * crv = ON_Curve::Cast(obj->Geometry());
if(crv) {
	ON_Line axis(ON_3dPoint(0,0,1),ON_3dPoint(0,0,0));
	ON_Interval interval(0,2*ON_PI);
	ON_Curve * crvd = crv->Duplicate();
	const ON_Surface * crvRev = RhinoRevolve(crvd,axis, interval);

It seems to work fine for interpolated curves but it fails for some polycurves (and it even lags few seconds),

whereas Rhino is capable to do it in the correct way.

I wonder if I am using the right function.

Hi @gennaro,

Can you provide a model that contains your input curve?

– Dale


pol.3dm (17.3 KB)

Hi @gennaro,

See if this example is useful.

– Dale

it seems to be the right solution…