Page 1 of 1
Classify point relative to a solid
Posted: Tue Oct 01, 2024 12:23 am
by Tom Di Sessa
Hello
Is there a way to find out whether a point is inside or outside of a solid IBRepSolid_DG?
Thank you
Re: Classify point relative to a solid
Posted: Thu Oct 03, 2024 3:00 am
by Prashant Kande
Hi Tom
Query IMetrics_DG from the entity.
For BRep solids
IMetrics_DG.GetPointLocation() returns a value enumerated with
PointVsSurfaceLocation_DG
The check is relatively tricky. You need to be sure that either the surface is closed, or the point is close enough to the object.
For meshes, I believe the method returns -1 (inside), 0 (on the surface), 1 outside.