// File: TopOpeBRepBuild_PaveClassifier.cxx // Created: Thu Jun 17 18:44:17 1993 // Author: Jean Yves LEBEY // #include #include #include #include #include #include #include #include #include #ifdef DEB Standard_IMPORT Standard_Boolean TopOpeBRepTool_GettraceVC(); Standard_IMPORT Standard_Boolean TopOpeBRepTool_GettraceCLOV(); #endif //======================================================================= //function : TopOpeBRepBuild_PaveClassifier //purpose : //======================================================================= TopOpeBRepBuild_PaveClassifier::TopOpeBRepBuild_PaveClassifier (const TopoDS_Shape& E) : myEdgePeriodic(Standard_False), mySameParameters(Standard_False), myClosedVertices(Standard_False) { myEdge = TopoDS::Edge(E); if ( ! BRep_Tool::Degenerated(myEdge) ) { TopLoc_Location loc; Standard_Real f,l; Handle(Geom_Curve) C = BRep_Tool::Curve(myEdge,loc,f,l); if ( !C.IsNull() ) { if (C->IsPeriodic()) { TopoDS_Vertex v1,v2; TopExp::Vertices(myEdge,v1,v2); // v1 FORWARD, v2 REVERSED if ( !v1.IsNull() && !v2.IsNull() ) { // --- the edge has vertices myFirst = f; Standard_Real fC = C->FirstParameter(); Standard_Real lC = C->LastParameter(); myPeriod = lC - fC; myEdgePeriodic = mySameParameters = v1.IsSame(v2); if ( mySameParameters ) { myFirst = BRep_Tool::Parameter(v1,myEdge); } } else { // --- the edge has no vertices myFirst = f; myPeriod = l - f; myEdgePeriodic = Standard_True; mySameParameters = Standard_False; } } } #ifdef DEB if (TopOpeBRepTool_GettraceVC()) { cout< myP2) cout<<" p1 > p2"; cout<<" --> state "; TopAbs::Print(state,cout); cout< "< "< state "; TopAbs::Print(state,cout); cout<Vertex().Orientation(); myO2 = PV2->Vertex().Orientation(); myP1 = PV1->Parameter(); myP2 = PV2->Parameter(); #ifdef DEB if (TopOpeBRepTool_GettraceVC()) { cout< final state "; TopAbs::Print(state,cout); cout<