Hello
Is there a way to find out whether a point is inside or outside of a solid IBRepSolid_DG?
Thank you
Classify point relative to a solid
-
- Posts: 65
- Joined: Tue Jun 18, 2024 6:12 am
Re: Classify point relative to a solid
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.
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.