Hi
I am messing with projecting a point to a face using IUVSurface_DG.GetNearestPoints()
The issue I am having: if face is, say a hemisphere the methods returns two points, so there is an extra work of sorting which point is relevant. I also need to check distance to edge(s) and vertices.
Is there a better automated API for this?
Thanks
Orthogonal projection to a face
Re: Orthogonal projection to a face
I think you can use the method described in this thread: Project point to solid.
Query IMetrics_DG from the entity of the face. If you have just a face, you can wrap it in an entity in the same way as the point is wrapped in the above topic:
Query IMetrics_DG from the entity of the face. If you have just a face, you can wrap it in an entity in the same way as the point is wrapped in the above topic:
Code: Select all
IEntity_DG iEntityPoint = iGener.Create("IEntity_DG") as IEntity_DG;
IBRepGeometry_DG iGeom = iEntityPoint.SetGeometryType("BRep") as IBRepGeometry_DG;
iGeom.SetShape(iFace as IBRepShape_DG);
-
- Posts: 2
- Joined: Wed Jun 15, 2022 5:12 am
Re: Orthogonal projection to a face
Thank you, I will try that