Just to make sure I understand your question:
- You have an edge on a face.
- You have a 3D point on that edge
- You want the parameter along the 2D curve defined in the parametric space of the surface.
If this is correct, you might try the following:
- Get the 2D curve for the edge in the parametric space of the face using BRep_Tool::CurveOnSurface.
- Get the underlying surface for the face using BRep_Tool::Surface
- Get the 2D location of the point in the parametric space of the surface using ShapeAnalysis_Surface::ValueOfUV
- Get the parameter of the 2d point by projecting it on the 2d curve with Geom2dAPI_ProjectPointOnCurve
There are other ways, but this is the first to come to mind.
Thu, 01/24/2008 - 17:22
Just to make sure I understand your question:
- You have an edge on a face.
- You have a 3D point on that edge
- You want the parameter along the 2D curve defined in the parametric space of the surface.
If this is correct, you might try the following:
- Get the 2D curve for the edge in the parametric space of the face using BRep_Tool::CurveOnSurface.
- Get the underlying surface for the face using BRep_Tool::Surface
- Get the 2D location of the point in the parametric space of the surface using ShapeAnalysis_Surface::ValueOfUV
- Get the parameter of the 2d point by projecting it on the 2d curve with Geom2dAPI_ProjectPointOnCurve
There are other ways, but this is the first to come to mind.
Rob
Thu, 01/24/2008 - 17:57
Great! It works well now. Thank u very much.