Hi,
I got an automated height detection that uses ClosestPoint.
If the user uses a CageEdit => BoundingBox the Brep.ClosestPoint will use this Cage instead of the Brep itself…
Dim br As Brep = New DocObjects.ObjRef(g).Brep //g is the Guid of the Brep I use
Dim bb As BoundingBox = br.GetBoundingBox(True)
Dim pt As New Point3d(bb.Center.X, bb.Min.Y + 35, bb.Min.Z - 70)
Dim newPt As Point3d = br.ClosestPoint(pt)
If CageEdit is off I get the right result. When the user uses a CageEdit => BoundingBox then I will always get the bb.Min.Z result.
How can I get the right result?