Wire on surface/face

hi
I have set of curves and the wire from it is projected on to a surface or face.
The 'wire on surface' needs to be used for further operation, say
split the face. Any API to know whether the wire lies on face/surface ?
thanks
-pg

Evgeny Lodyzhehsky's picture

Dear PG.

The wire W is a set of edges Ei (i=1,2...nE).
1. Explore it onto edges Ei. Use the class TopoDS_Iterator.
2. Check whether the edge Ei has p-curve on surface. Use the method:

Handle(Geom2d_Curve) BRep_Tool::CurveOnSurface(const TopoDS_Edge& E,
const TopoDS_Face& F,
Standard_Real& First,
Standard_Real& Last)

---Purpose: Returns the curve associated to the edge in the
-- parametric space of the face. Returns a NULL
-- handle if this curve does not exist. Returns in
-- and the parameter range.