Hi,
Is there any working way of checking if brep is inside volume? I’m using IsPointInside on closed volume to check several points of breb and if they are true I assume object is inside of this volume. Is there a better way to do it?
Hi,
Is there any working way of checking if brep is inside volume? I’m using IsPointInside on closed volume to check several points of breb and if they are true I assume object is inside of this volume. Is there a better way to do it?
If you want to check fewer points and the volume you check against is convex, you could run a convex hull on the brep and get a mesh and check if all of the points are inside the volume. But there is probably a better way
The problem I’m having is that when I check breps that are adjacent to the volume, not all points are computed as inside even thought they are inside within the tolerance. Example is below. When I compute points of outer loop sometimes (randomly?) points are not inside. This is the failing line:
var isMidPointInside = brepCompartment.IsPointInside(loop.PointAtNormalizedLength(0.5), tolerance, false);
Also here interesting is that when I check the distance to the closest point of volume:
var dist3 = loop.PointAtNormalizedLength(0.5).DistanceTo(brepCompartment.ClosestPoint(loop.PointAtNormalizedLength(0.5)));
The distance is smaller than tolerance, which suggests that maybe the IsPointInside
is not cmputing correctly?
For one case the distance dist3 is 0.3733 while the tolerance is 1.5 and ‘is strictly inside’ set to false. So in theory the point is inside the volume within tolerance. Still this is not confirmed by isMidPointInside.