Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8664

Polysurfaces

$
0
0

@f.leon.marquez95 wrote:

Hello, I would like to know if there is a way to select a polysurface and treat this as a surface using c++, I am using Rhino 5 by the way. I mean, for example if I had a polysurface and I want to get the area and centroid, how could I write a line of code to do this or which type of ON_geometry would it be.
For example for getting a surface I type these lines of code

CRhinoGetObject go;

go.SetCommandPrompt( L"Select surface" );
go.SetGeometryFilter( CRhinoGetObject::surface_object );
go.GetObjects( 1, 1 );
if( go.CommandResult() != success )
	return go.CommandResult();
// Validate selection
const CRhinoObjRef& refSurf = go.Object(0);
const CRhinoObject* objSurf = refSurf.Object();
const ON_Surface* srf = refSurf.Surface();
if( !srf )
	return failure;

but it doesnt work for polysurfaces, would there be a way to select a polysurface?

Thank you

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 8664

Trending Articles