Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] Is Element a Solid?

$
0
0

I'm writing a tool that wants to check whether an element is a solid of some kind.

I think that I can do this for a primitive solid (slab, cone, extrusion etc)...

const bool DontSimplify { false };
ISolidPrimitivePtr solid = ISolidPrimitiveQuery::ElementToSolidPrimitive (eh_, DontSimplify);
bool valid = solid.IsValid ();

Or this for a SmartSolid...

ISolidKernelEntityPtr smartSolid;
bool valid = (SUCCESS == SolidUtil::Convert::ElementToBody (smartSolid, eh_)&&
             smartSolid.IsValid ());

Are those good ways to detect a solid?  How can I combine them to figure out if an element is something that has a volume that I can subsequently measure?


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>