For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

project point on curve

Dean's picture
Forums: 

hi guys,

I am tring to project a point to a curve; however, the location of the points is not correctly showed on the screen...(the curve is correctly showed).

TopoDS_Shape tmpShape=EdgeOfWire1->Value(1);
TopoDS_Edge tmpEdge=TopoDS::Edge(tmpShape);
Handle(Geom2d_Curve)tmpCurve=BRep_Tool::CurveOnSurface(tmpEdge,aFace,tmpF,tmpL);
Geom2dAPI_InterCurveCurve intCC(tmpCurve, myCurve,Tol);

if (intCC.NbPoints()>0)
{
tmpPArray->SetValue(i,intCC.Point(1));
Geom2dAPI_ProjectPointOnCurve p1(tmpPArray->Value(1),tmpCurve);
gp_Pnt2d p11=p1.Point(1);
gp_Pnt paa(p11.X(),p11.Y(),0);
TopoDS_Vertex gg=BRepBuilderAPI_MakeVertex(paa);
BRepTools::Write(gg,\"out2.brep\");

thanks for your help!