Accessing mesh

Technical discussions
Post Reply
Marco Cilic
Posts: 1
Joined: Thu Mar 28, 2019 4:10 am

Accessing mesh

Post by Marco Cilic »

Hi
Is there a way to get mesh of a bspline object? I have tried to cast both IEntity_DG and its IGeometry to IMesh without luck. And I do not see a method in the interface.
My thinking is that mesh should be there for rendering at least.
Thanks

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Accessing mesh

Post by Prashant Kande »

Hi Marco
Not directly. Parametric objects do not keep mesh. Rendering data is stored in the video card memory only.

This is one way to get mesh:
IEntity_DG iEnt = ...;
IEntity_DG iEntMesh = iEnt.Clone();
IGeometry_DG iGeom = iEntMesh.SetGeometryType("Mesh");
IMesh iMesh = iGeom as IMesh;

You could also save the object as vrml or stl. Objects are converted to mesh during export

Regards

Post Reply