#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-#ifdef DEB
+#ifdef OCCT_DEBUG
// For measurements.
#include <OSD_Chronometer.hxx>
//static OSD_Chronometer appclock;
static Standard_Integer IndexOfConge = 0;
#endif
-#ifdef DEB
+#ifdef OCCT_DEBUG
extern Standard_Boolean ChFi3d_GettraceDRAWFIL();
extern Standard_Boolean ChFi3d_GettraceDRAWWALK();
extern Standard_Boolean ChFi3d_GetcontextNOOPT();
else if(IsVois(curE,Vref,VEMap,DONE,prof+1,profmax)) return Standard_True;
}
const TopTools_ListOfShape& L2 = VEMap(V2);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer i2 = nbedconnex(L2);
#endif
TopTools_ListIteratorOfListOfShape It2(L2);
}
else {
//(2) Intersection
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<< "CompParam : bad intersection parameters"<<endl;
#endif
IntRes2d_IntersectionPoint int2d;
if (!Intersection.IsEmpty()){
nbseg = Intersection.NbSegments();
if ( nbseg > 0 ){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<< "segments of intersection on the restrictions"<<endl;
#endif
}
if(!found){
// (3) Projection...
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"CompParam : failed intersection PC, projection is created."<<endl;
#endif
parc = prefarc;
// This happens in some cases when there is a vertex
// at the end of spine...
ptg = preftg;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"CompParam : failed proj p2d/c2d, the extremity is taken!" <<endl;
#endif
}
tolappangle, // Contact G1
myConti, Degmax, Segmax);
if (!approx.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Approximation non faite !!!" << endl;
#endif
return Standard_False;
}
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
approx.Dump(cout);
#endif
return StoreData( Data, approx, lin, S1, S2, Or1, Gd1, Gd2, Gf1, Gf2, Reversed);
tolappangle, // Contact G1
myConti);
if (!approx.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Approximation is not done!" << endl;
#endif
return Standard_False;
}
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
approx.Dump(cout);
#endif
tolappangle, // Contact G1
myConti);
if (!approx.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Approximation non faite !!!" << endl;
#endif
return Standard_False;
}
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
approx.Dump(cout);
#endif
chc.Load(Crv3d1,par1,par2);
if(!ChFi3d_CheckSameParameter(checkcurve,PCurveOnFace,S1,tolC1,tolcheck)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"aaproximate tolerance under-valued : "<<tolC1<<" for "<<tolcheck<<endl;
#endif
tolC1 = tolcheck;
approx.Curves2dDegree());
chc.Load(Crv3d2,par1,par2);
if(!ChFi3d_CheckSameParameter(checkcurve,PCurveOnFace,S2,tolC2,tolcheck)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"approximate tolerance under-evaluated : "<<tolC2<<" for "<<tolcheck<<endl;
#endif
tolC2 = tolcheck;
if(!TheWalk.PerformFirstSection(Func,FInv,FInvP,FInvC,PFirst,Target,Soldep,
tolesp,TolGuide,RecRst,RecP,RecS,
NewFirst,ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<<endl;
#endif
return Standard_False;
MS,TolGuide,ParSol,tolesp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path not created" << endl;
#endif
return Standard_False;
if (reverse) {
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"one point of the path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt<=nbptmin && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
Standard_Real u1 = Lin->Point(1).Parameter();
Target = Targetsov;
}
else if(Nbpnt<=nbptmin){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if (!TheWalk.PerformFirstSection(Func, FInv1, FInvP1, FInv2, FInvP2, PFirst, Target, Soldep,
tolesp, TolGuide, RecRst1, RecP1, RecRst2, RecP2,
NewFirst, ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::ComputeData : fail calculation first section"<<endl;
#endif
return Standard_False;
MS, TolGuide, ParSol, tolesp, Fleche, Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path not done" << endl;
#endif
return Standard_False;
if (reverse) {
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"one point of path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt<=nbptmin && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
Standard_Real u1 = Lin->Point(1).Parameter();
Target = Targetsov;
}
else if(Nbpnt<=nbptmin){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if(!TheWalk.PerformFirstSection(Func,FInv,FInvP,FInvC,PFirst,Target,Soldep,
tolesp,TolGuide,RecRst,RecP,RecS,
NewFirst,ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::SimulData : fail calculate first section"<<endl;
#endif
TheWalk.Perform (Func,FInv,FInvP,FInvC,NewFirst,Last,
MS,TolGuide,ParSol,tolesp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path not done" << endl;
#endif
return Standard_False;
}
if (reverse) {
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"one point of path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt <= NbSecMin && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
Standard_Real u1 = Lin->Point(1).Parameter();
Target = Targetsov;
}
else if(Nbpnt<=NbSecMin){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if(!TheWalk.PerformFirstSection(Func, FInv1, FInvP1, FInv2, FInvP2, PFirst, Target, Soldep,
tolesp, TolGuide, RecRst1, RecP1, RecRst2, RecP2,
NewFirst,ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::SimulData : calculation fail first section"<<endl;
#endif
TheWalk.Perform (Func, FInv1, FInvP1, FInv2, FInvP2, NewFirst, Last,
MS, TolGuide, ParSol, tolesp, Fleche, Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path not created" << endl;
#endif
return Standard_False;
}
if (reverse) {
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"only one point of path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt <= NbSecMin && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
Standard_Real u1 = Lin->Point(1).Parameter();
Target = Targetsov;
}
else if(Nbpnt<=NbSecMin){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if(!TheWalk.PerformFirstSection(Func,FInv,PFirst,Target,Soldep,
tolesp,TolGuide,RecOnS1,RecOnS2,
NewFirst,ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<<endl;
#endif
return Standard_False;
TheWalk.Perform(Func,FInv,NewFirst,Target,MS,TolGuide,
ParSol,TolEsp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path is not created" << endl;
#endif
return Standard_False;
Standard_Boolean complmnt = Standard_True;
if (Inside) complmnt = TheWalk.Complete(Func,FInv,SpLast);
if(!complmnt){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
return Standard_False;
//- if one has gone far enough.
Nbpnt = Lin->NbPoints();
if (Nbpnt == 0){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"0 point of path, quit."<<endl;
#endif
return Standard_False;
//It drags, the controls are extended, it is expected to evaluate a
//satisfactory maximum step. If it already done, quit.
if(tchernobyl){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"If it drags without control, quit."<<endl;
#endif
return Standard_False;
tchernobyl = Standard_True;
TheWalk.Check(0);
if (Nbpnt == 1){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"only one point of path MS/100 is attempted"<<endl;
cout <<"and the controls are extended."<<endl;
#endif
MS *= 0.01;
}
else{
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"It drags, the controls are extended."<<endl;
#endif
MS = (lpointpar-fpointpar)/Nbpnt; //EvalStep(Lin);
}
else if (Nbpnt < nbptmin){
if(again == 0){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
u1sov = fpointpar;
else if(again == 1){
if(Abs(fpointpar-u1sov)>=TolGuide ||
Abs(lpointpar-u2sov)>=TolGuide){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, the step is reduced"<<endl;
#endif
MS = (lpointpar - fpointpar) * factor;
}
else{
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if(TheWalk.TwistOnS1()){
Data->TwistOnS1(Standard_True);
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"Path completed, but TWIST on S1"<<endl;
#endif
}
if(TheWalk.TwistOnS2()){
Data->TwistOnS2(Standard_True);
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"Parh completed, but TWIST on S2"<<endl;
#endif
}
if(!TheWalk.PerformFirstSection(Func,FInv,PFirst,Target,Soldep,
tolesp,TolGuide,RecOnS1,RecOnS2,
NewFirst,ParSol)){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout<<"ChFi3d_Builder::SimulData : calculation fail first section"<<endl;
#endif
return Standard_False;
ParSol,TolEsp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Path not created" << endl;
#endif
return Standard_False;
Standard_Boolean complmnt = Standard_True;
if (Inside) complmnt = TheWalk.Complete(Func,FInv,SpLast);
if(!complmnt){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout << "Not completed" << endl;
#endif
return Standard_False;
Nbpnt = Lin->NbPoints();
Standard_Real factor = 1./(NbSecMin + 1);
if (Nbpnt == 0){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"0 point of path, quit."<<endl;
#endif
return Standard_False;
}
else if (Nbpnt == 1 && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"only one point of path, MS/100 is attempted."<<endl;
#endif
MS *= 0.01; Target = Targetsov;
}
else if (Nbpnt< NbSecMin && again == 0) {
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is too small, the step is reduced"<<endl;
#endif
Standard_Real u1 = u1sov = Lin->Point(1).Parameter();
Standard_Real u2 = Lin->Point(Nbpnt).Parameter();
if(Abs(u1-u1sov)>=TolGuide || Abs(u2-u2sov)>=TolGuide){
again++;
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, the step is reduced"<<endl;
#endif
MS /= 100;
Target = Targetsov;
}
else{
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
}
}
else if(Nbpnt < NbSecMin){
-#ifdef CHFI3D_DEB
+#ifdef OCCT_DEBUG
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;