Output to cout activated previously in Debug mode by #ifdef DEB is suppressed by using macro <PACKAGE>_DEB instead of DEB
void AIS_InteractiveContext::DisplayedObjects(AIS_ListOfInteractive& aListOfIO,
const Standard_Boolean OnlyFromNeutral) const
{
-#ifdef DEBUG
+#ifdef AIS_DEB
cout<<"AIS_IC::DisplayedObjects"<<endl;
#endif
if(It.Value()->GraphicStatus()==AIS_DS_Displayed)
theMap.Add(It.Key());
}
-#ifdef DEBUG
+#ifdef AIS_DEB
cout<<"\tFrom Neutral Point : "<<theMap.Extent()<<endl;
#endif
//parse all local contexts...
-#ifdef DEBUG
+#ifdef AIS_DEB
Standard_Integer NbDisp;
for(AIS_DataMapIteratorOfDataMapOfILC it1(myLocalContexts);it1.More();it1.Next()){
const Handle(AIS_LocalContext)& LC = it1.Value();
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
NbDisp++;
}
anIObj->SetRecomputeOk();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
}
anIObj->Update(ITI.Value(),Standard_False);
NbDisp++;
}
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
anIObj->SetRecomputeOk();
anIObj->Update(ITI.Value(),Standard_False);
NbDisp++;
}
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"nb of modes to recalculate : "<<NbDisp<<endl;
#endif
anIObj->SetRecomputeOk();
UpdateCurrentViewer();
}
else{
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"Nothing Done : Opened Local Context"<<endl;
#endif
}
UpdateCurrentViewer();
}
else{
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"Nothing Done : Opened Local Context"<<endl;
#endif
}
{
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"Not Yet Implemented"<<endl;
#endif
}
const Standard_Boolean updateviewer)
{
if(!HasOpenedContext()) {
-#ifdef DEB
+#ifdef AIS_DEB
cout<<" Attempt to remove a selected shape with no opened local context"<<endl;
#endif
return;
const Standard_Boolean updateviewer)
{
if(!HasOpenedContext()) {
-#ifdef DEB
+#ifdef AIS_DEB
cout<<" Attempt to remove a selected ownr with no opened local context"<<endl;
#endif
return;
NewLocal->MainSelector()->UpdateConversion();
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"\tOpen Local Context No "<<myCurLocalIndex<<endl;
if(UseDisplayedObjects){
cout<<"\t\tObjects from Neutral Point loaded"<<endl;
{
Standard_Boolean debugmode(Standard_False);
-#ifdef DEB
+#ifdef AIS_DEB
debugmode = Standard_True;
#endif
return;
if (myDrawer.IsNull()) {
myDrawer = new AIS_Drawer;
-#ifdef DEB
+#ifdef AIS_DEB
cout << "AIS_InteractiveObject::SetContext DRAWER NUL!" << endl;
#endif
}
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
if(Sel.IsNull()) {
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "
<<mySelName<<" Nulle "<<endl;
#endif
Handle(AIS_Selection) Sel = AIS_Selection::Selection(mySelName.ToCString());
if(Sel.IsNull()) {
-#ifdef DEB
+#ifdef AIS_DEB
cout<<"\t\tAIS_LocalCOntext::FindSelectedOwnerFromShape : Selection "<<mySelName<<" Nulle "<<endl;
#endif
return EO;
case 0:{
try { OCC_CATCH_SIGNALS StdPrs_WFDeflectionShape::Add(aPrs,myshape,myDrawer); }
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef AIS_DEB
cout << "AIS_Shape::Compute() failed"<< endl;
-#endif
cout << "a Shape should be incorrect : No Compute can be maked on it "<< endl;
+#endif
// presentation of the bounding box is calculated
// Compute(aPresentationManager,aPrs,2);
}
StdPrs_ShadedShape::Add(aPrs,myshape,myDrawer);
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef AIS_DEB
cout << "AIS_Shape::Compute() in ShadingMode failed"<< endl;
#endif
StdPrs_WFShape::Add(aPrs,myshape,myDrawer);
Standard_Boolean isOwnHLRDeviationCoefficient = OwnHLRDeviationCoefficient(newcoeff,prevcoeff);
if (((Abs (newangle - prevangle) > Precision::Angular()) && isOwnHLRDeviationAngle) ||
((Abs (newcoeff - prevcoeff) > Precision::Confusion()) && isOwnHLRDeviationCoefficient)) {
-#ifdef DEB
+#ifdef AIS_DEB
cout << "AIS_Shape : compute"<<endl;
cout << "newangle : " << newangle << " # de " << "prevangl : " << prevangle << " OU "<<endl;
cout << "newcoeff : " << newcoeff << " # de " << "prevcoeff : " << prevcoeff << endl;
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef AIS_DEB
cout <<"AIS_Shape::Compute(Proj) HLR Algorithm failed" << endl;
#endif
StdPrs_WFShape::Add(aPresentation,SH,myDrawer);
}
else
{
+#ifdef AIS_DEB
std::cout << "Texture " << theTextureFileName << " doesn't exist\n";
std::cout << "Using Texture 0 instead ...\n";
+#endif
myPredefTexture = Graphic3d_NameOfTexture2D (0);
}
myTextureFile = "";
myAspect->SetTextureMap (myTexture);
if (!myTexture->IsDone())
{
+#ifdef AIS_DEB
std::cout << "An error occurred while building texture\n";
+#endif
myAspect->SetTextureMapOff();
return;
}
}
catch (Standard_Failure)
{
+#ifdef AIS_DEB
std::cout << "AIS_TexturedShape::Compute() in ShadingMode failed \n";
+#endif
StdPrs_WFShape::Add (thePrs, myshape, myDrawer);
}
break;
// else if (*ndgjac < 61) { nbpnt = 61;} Bug Uneven number
else {
nbpnts = 50;
-#if DEB
+#if ADVAPP2VAR_DEB
cout << "F(U, V) : Not enough points of discretization" << endl;
#endif
}
mytol3d = Max(TheTol3d, mytol3d);
mytol2d = Max(TheTol2d, mytol2d);
}
-#ifdef DEB
+#ifdef APPBLEND_DEB
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
}
theapprox.Perform(multL);
theapprox.Error(mytol3d,mytol2d);
-#ifdef DEB
+#ifdef APPBLEND_DEB
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
mytol3d = Variation.MaxError();
mytol2d = 0.;
-#ifdef DEB
+#ifdef APPBLEND_DEB
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
}
// modified by EAP Thu Jan 3 15:45:27 2002 ___END___
}
-#ifdef DEB
+#ifdef APPBLEND_DEB
cout << " Tolerances obtenues --> 3d : "<< mytol3d << endl;
cout << " --> 2d : "<< mytol2d << endl;
#endif
F.Parameter(Lin->Point(Lin->NbPoints())),
tabVKnots->ChangeArray1()
);
-#ifdef DEB
+#ifdef APPBLEND_DEB
cout << "Warning: AppBlend_AppSurf::Perform(), bad length of aParamSeq: " <<
aParamSeq.Length() << " instead of " << tabVKnots->Length() << endl;
#endif
TolV = Tol / (4.*Max_dS_dv);
TolW = Tol / (4.*Max_dS_dw);
-#ifdef DEB
+#ifdef APPROX_DEB
cout << "TolV = " << TolV << endl;
cout << "TolW = " << TolW << endl;
#endif
if(!projok)
{
//Projector
-#ifdef DEB
+#ifdef APPROX_DEB
// JAG
cout << "Projection not done" << endl;
#endif
if(!extrok) { // If not already SameP and tangent to mill, abandon.
mySameParameter = Standard_False;
-#ifdef DEB
+#ifdef APPROX_DEB
cout<<"SameParameter problem : zero tangent to extremities"<<endl;
#endif
return;
}
}
else {
-#ifdef DEB
+#ifdef APPROX_DEB
// JAG
cout << "Projection not done" << endl;
#endif
if (Precision::IsInfinite(algtol)) {
mySameParameter = Standard_False;
-#ifdef DEB
+#ifdef APPROX_DEB
cout<<"SameParameter problem : function of interpolation of parametration at mills !!"<<endl;
#endif
return;
}
}
else {
-#ifdef DEB
+#ifdef APPROX_DEB
// JAG
cout << "Projection not done" << endl;
#endif
}
}
myBuilderCanWork = (esp || tede) ;
-#ifdef DEB
+#ifdef BREPALGO_DEB
if (!esp) cout<<"BRepAlgo_BooleanOperation(DEB) some edges not SameParameter"<<endl;
#endif
if (!myBuilderCanWork) return;
// It is necessary to change Interferences => take the complement
iC = myHB->GetDSCurveFromSectEdge(Edge);
if (!iC) {
-#if DEB
+#if BREPALGO_DEB
cout << "Warning DSAccess: Modifications of Edge are not implemented" << endl;
#endif
}
for(k = 1; k <= Projector.NbCurves(); k++){
if(Projector.IsSinglePnt(k, P2d)){
-#ifdef DEBUG
+#ifdef BREPALGO_DEB
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is punctual"<<endl<<endl;
#endif
/**************************************************************/
if (Projector.IsUIso(k, UIso)) {
-#ifdef DEBUG
+#ifdef BREPALGO_DEB
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is U-isoparametric"<<endl<<endl;
#endif
Only3d = Standard_True;
}
else if (Projector.IsVIso(k, VIso)) {
-#ifdef DEBUG
+#ifdef BREPALGO_DEB
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is V-isoparametric"<<endl<<endl;
#endif
}
}
if (Degenerated) {
-#ifdef DEBUG
+#ifdef BREPALGO_DEB
cout << "Projection of edge "<<i<<" on face "<<j;
cout << " is degenerated "<<endl<<endl;
#endif
LS = HB->Splits(prj, TopAbs_IN);
Iter.Initialize(LS);
if(Iter.More()) {
-#ifdef DEBUG
+#ifdef BREPALGO_DEB
cout << " BooleanOperations :" << Iter.More()<<" solutions " << endl;
#endif
for(; Iter.More(); Iter.Next()) {
}
}
else {
-#ifdef DEB
+#ifdef BREPALGO_DEB
cout << " BooleanOperations : no solution " << endl;
#endif
}
if (NbSub == 0)
{
-#ifdef DEB
+#ifdef BREPALGO_DEB
cout << "No subhape in shape!" << endl;
#endif
SS = TopoDS_Shape();
rsnld.Perform(Func, XInit, X1, X2);
if (!rsnld.IsDone()) {
-# ifdef DEB
+# ifdef BREPBLEND_DEB
cout << "AppFunc : RNLD Not done en t = " << Param << endl;
# endif
return Standard_False;
// (4) Insertion of the point if the calculation seems long.
if ((!Trouve)&&(rsnld.NbIterations()>3)) {
-#ifdef DEB
+#ifdef BREPBLEND_DEB
cout << "Evaluation in t = " << Param << "given" << endl;
rsnld.Dump(cout);
#endif
norm = ncrossns.Magnitude();
if (norm < Eps) {
norm = 1; // Not enough, but it is not necessary to stop
-#if DEB
+#if BREPBLEND_DEB
cout << " SurfRstConstRad : Singular Surface " << endl;
#endif
}
norm = ncrossns.Magnitude();
if (norm < Eps) {
norm = 1; // Not enough, but it is not necessary to stop
-#if DEB
+#if BREPBLEND_DEB
cout << " SurfRstEvolRad : Surface single " << endl;
#endif
}
}
else{
// Failed reframing. Leave with PointsConfondus
-#if DEB
+#if BREPBLEND_DEB
cout<<"SurfRstLineBuilder : failed reframing"<<endl;
#endif
State = Blend_SamePoints;
Arrive = Standard_True;
if (line->NbPoints()>=2) {
// Indicate that one stops during the processing
-#if DEB
+#if BREPBLEND_DEB
cout<<"SurfRstLineBuilder : No advancement in the processing"<<endl;
#endif
}
case Blend_SamePoints :
{
// Stop
-#if DEB
+#if BREPBLEND_DEB
cout << "SurfRstLineBuilder Points mixed in the processing" << endl;
#endif
previousP.ParametersOnS(U,V);
rsnld.Perform(FinvC,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#if BREPBLEND_DEB
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
rsnld.Perform(FinvC,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#if BREPBLEND_DEB
cout << "SurfRstLineBuilder : RSNLD not done "<< endl << endl;
#endif
}
math_FunctionSetRoot rsnld(Finv,toler,30);
rsnld.Perform(Finv,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#if BREPBLEND_DEB
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;
math_FunctionSetRoot rsnld(FinvP,toler,30);
rsnld.Perform(FinvP,Solinv,infb,supb);
if (!rsnld.IsDone()) {
-#if DEB
+#if BREPBLEND_DEB
cout << "SurfRstLineBuilder :RSNLD not done "<< endl;
#endif
return Standard_False;
//purpose :
//=======================================================================
-#ifdef DEB
+#ifdef BREPBUILDERAPI_DEB
#include <OSD_Timer.hxx>
#endif
{
const Standard_Integer aNumberOfStages = myAnalysis + myCutting + mySewing + 2;
Message_ProgressSentry aPS (thePI, "Sewing", 0, aNumberOfStages, 1);
-#ifdef DEB
+#ifdef BREPBUILDERAPI_DEB
Standard_Real t_total = 0., t_analysis = 0., t_assembling = 0., t_cutting = 0., t_merging = 0.;
OSD_Chronometer chr_total, chr_local;
chr_total.Reset();
// face analysis
if (myAnalysis)
{
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Begin face analysis..." << endl;
chr_local.Reset();
chr_local.Start();
if (!aPS.More())
return;
aPS.Next();
-#if DEB
+#if BREPBUILDERAPI_DEB
chr_local.Stop();
chr_local.Show(t_analysis);
cout << "Face analysis finished after " << t_analysis << " s" << endl;
if (myBoundFaces.Extent())
{
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Begin vertices assembling..." << endl;
chr_local.Reset();
chr_local.Start();
if (!aPS.More())
return;
aPS.Next();
-#if DEB
+#if BREPBUILDERAPI_DEB
chr_local.Stop();
chr_local.Show(t_assembling);
cout << "Vertices assembling finished after " << t_assembling << " s" << endl;
#endif
if (myCutting)
{
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Begin cutting..." << endl;
chr_local.Reset();
chr_local.Start();
if (!aPS.More())
return;
aPS.Next();
-#if DEB
+#if BREPBUILDERAPI_DEB
chr_local.Stop();
chr_local.Show(t_cutting);
cout << "Cutting finished after " << t_cutting << " s" << endl;
#endif
}
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Begin merging..." << endl;
chr_local.Reset();
chr_local.Start();
if (!aPS.More())
return;
aPS.Next();
-#if DEB
+#if BREPBUILDERAPI_DEB
chr_local.Stop();
chr_local.Show(t_merging);
cout << "Merging finished after " << t_merging << " s" << endl;
if (mySewing)
{
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Creating sewed shape..." << endl;
#endif
// examine the multiple edges if any and process sameparameter for edges if necessary
mySewedShape.Nullify();
return;
}
-#if DEB
+#if BREPBUILDERAPI_DEB
cout << "Sewed shape created" << endl;
#endif
}
return;
}
}
-#if DEB
+#if BREPBUILDERAPI_DEB
chr_total.Stop();
chr_total.Show(t_total);
cout << "Sewing finished!" << endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef BREPCHECK_DEB
cout<<"BRepCheck_Analyzer : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
localok = Standard_False;
}
}
-#ifdef DEB
+#ifdef BREPCHECK_DEB
if(localok) {
printf("--- BRepCheck Wire: AutoIntersection Phase2 -> Bon \n");
printf("--- distance Point Vertex : %10.7g (tol %10.7g)\n",distauvtxleplusproche,tolvtt);
IntCurveSurface_TransitionOnCurve tran = Intersector3d.Transition(i);
if (tran == IntCurveSurface_Tangent) {
-#ifdef DEB
+#ifdef BREPCLASS3D_DEB
cout<<"*Problem ds BRepClass3d_SClassifier.cxx"<<endl;
#endif
continue; // ignore this point
if(NbFacesInSolid==0) {
_Par=0.0;
myReject=Standard_True;
-#if DEB
+#if BREPCLASS3D_DEB
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid without face)"<<endl;
#endif
return 0;
myReject=Standard_False; //-- at least one face in the solid
}
-#if DEB
+#if BREPCLASS3D_DEB
if(myReject) {
cout<<"\nWARNING : BRepClass3d_SolidExplorer.cxx (Solid without face)"<<endl;
}
//#else
// Standard_Real par = Max( Max( abs(c[1] - c[0]), abs(c[3] - c[2]) ), abs(c[5] - c[4]) );
//#endif
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Height = > " << par << endl;
#endif
return par;
if (!ProfileOK) {
#ifdef DEB
- cout << "Not computable" << endl;
- if (trc) cout << "Face profile not computable" << endl;
+ if (trc)
+ {
+ cout << "Not computable" << endl;
+ cout << "Face profile not computable" << endl;
+ }
#endif
myStatusError = BRepFeat_NoFaceProf;
NotDone();
Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Verify plane and wire orientation" << endl;
#endif
myStatusError = BRepFeat_FalseSide;
if (!ProfileOK) {
#ifdef DEB
- cout << "Not computable" << endl;
- if (trc) cout << " Face profile not computable" << endl;
+ if (trc)
+ {
+ cout << "Not computable" << endl;
+ cout << " Face profile not computable" << endl;
+ }
#endif
myStatusError = BRepFeat_NoFaceProf;
NotDone();
Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Verify plane and wire orientation" << endl;
#endif
myStatusError = BRepFeat_FalseSide;
if(!myGluedF.IsEmpty() && !mySUntil.IsNull()) {
#ifdef DEB
- cout << "The case is not computable" << endl;
- if (trc) cout << " Glued faces not empty and Until shape not null" << endl;
+ if (trc)
+ {
+ cout << "The case is not computable" << endl;
+ cout << " Glued faces not empty and Until shape not null" << endl;
+ }
#endif
myStatusError = BRepFeat_InvShape;
NotDone();
for (it.Initialize(ledg); it.More(); it.Next()) {
const TopTools_ListOfShape& gfac = thePrism.Shapes(it.Value());
if (gfac.Extent() != 1) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Pb SetGluedFace" << endl;
#endif
}
if (!ProfileOK) {
#ifdef DEB
- cout << "Not computable" << endl;
- if (trc) cout << "Face profile not computable" << endl;
+ if (trc)
+ {
+ cout << "Not computable" << endl;
+ cout << "Face profile not computable" << endl;
+ }
#endif
myStatusError = BRepFeat_NoFaceProf;
NotDone();
Sliding = Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << " Verify plane and wire orientation" << endl;
#endif
myStatusError = BRepFeat_FalseSide;
if(!BRepAlgo::IsValid(NewBndFace)) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Invalid new bounding face" << endl;
#endif
myStatusError = BRepFeat_InvShape;
if (!ProfileOK) {
#ifdef DEB
- cout << "Not computable" << endl;
- if (trc) cout << " Face profile not computable" << endl;
+ if (trc)
+ {
+ cout << "Not computable" << endl;
+ cout << " Face profile not computable" << endl;
+ }
#endif
myStatusError = BRepFeat_NoFaceProf;
NotDone();
Propagate(SliList, Prof, myFirstPnt, myLastPnt, falseside);
// Control if there is everything required to have the material at the proper side
if(falseside == Standard_False) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << " Verify plane and wire orientation" << endl;
#endif
myStatusError = BRepFeat_FalseSide;
if(!myGluedF.IsEmpty() && !mySUntil.IsNull()) {
#ifdef DEB
- cout << "The case is not computable" << endl;
- if (trc) cout << " Glued faces not empty and Until shape not null" << endl;
+ if (trc)
+ {
+ cout << "The case is not computable" << endl;
+ cout << " Glued faces not empty and Until shape not null" << endl;
+ }
#endif
myStatusError = BRepFeat_InvShape;
NotDone();
for (it.Initialize(ledg); it.More(); it.Next()) {
const TopTools_ListOfShape& gfac = thePrism.Shapes(it.Value());
if (gfac.Extent() != 1) {
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Pb SetGluedFace" << endl;
#endif
}
(!myFuse && ope != LocOpe_CUT) ||
(!Collage)) {
theOpe = 2;
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Passage to topological operations" << endl;
#endif
}
}
else {
theOpe = 2;
-#ifdef DEB
+#ifdef BREPFEAT_DEB
cout << "Passage to topologic operation" << endl;
#endif
}
}
}
}
-#if DEB
+#if BREPFILL_DEB
else {
cout << "BRepFill::SearchOrigine : Echec Distance" << endl;
}
myWire = MW.Wire();
}
else {
-#if DEB
+#if BREPFILL_DEB
cout << "Error in MakeWire" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
}
}
else {
-#if DEB
+#if BREPFILL_DEB
cout << "No Free Borders !" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
myShape = solid;
}
}
-#if DEB
+#if BREPFILL_DEB
else cout << "Draft : No assembly !" << endl;
#endif
return Ok;
gp_Ax1 axe(gp::Origin(), cross.XYZ());
N2.Rotate(axe, alpha);
-#if DEB
+#if BREPFILL_DEB
if (N2.Dot(T1) > 1.e-9) {
cout << "Inprecision in TransformInCompatibleLaw" << endl;
cout << "--- T1.R(N2) = " << N2.Dot(T1) << endl;
}
else {
W.Nullify();
-#if DEB
+#if BREPFILL_DEB
cout << "BRepFill_LocationLaw::D0 : Attention position out of limits"
<< endl;
#endif
Dist = TheU.Circle().Radius();
}
else {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "MultiLine : D1 = D2 and the Curve is not a circle" << endl;
cout << " ---> ValueOnFace failed at parameter U = " << U << endl;
#endif
Geom2dInt_GInter Intersector(Cu1,Cu2,TolConf,Tol);
if ( !Intersector.IsDone()) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "Intersector not done" << endl;
cout << " ---> ValueonFace failed at parameter U = " << U << endl;
#endif
VV = Alp*(VS2 - VS1) + VS1;
}
else {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "Intersector done, but no points found" << endl;
cout << " ---> ValueonFace failed at parameter U = " << U << endl;
#endif
{
myShape.Nullify();
myIsDone = Standard_False;
+#ifdef BREPFILL_DEB
cout<<"An exception was caught in BRepFill_OffsetWire::Perform : ";
Standard_Failure::Caught()->Print(cout);
cout<<endl;
+#endif
return;
}
Standard_False, 20);
if (!Bof) Bof = Concat.Add(TC, 200*epsV,
Standard_True, Standard_False, 20);
-#if DEB
+#if BREPFILL_DEB
if (!Bof)
cout << "BRepFill_ShapeLaw::ConcatenedLaw INCOMPLET !!!"
<< endl;
Approx_SameParameter sp( HC3d, Pcurv, S, tol3d );
if(sp.IsDone() && !sp.IsSameParameter()) Pcurv = sp.Curve2d();
else if(!sp.IsDone() && !sp.IsSameParameter()){
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout<<"echec SameParameter"<<endl;
#endif
return Standard_False;
ResTol = sp.TolReached();
if(ResTol > tolreached ){
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout<<"SameParameter : Tolerance not reached!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtained : "<<ResTol<<endl;
#endif
Max(myTol3d, TabErr(isec,ipath)));
}
if (Degenerated(isec, ipath)) {
-#if DEB
+#if BREPFILL_DEB
cout << "Sweep : Degenerated case" << endl;
#endif
hasdegen = Standard_True;
t2 = M.Column(3);
if (t1.Angle(t2) < myAngMin) {
-#if DEB
+#if BREPFILL_DEB
cout << "BRepFill_Sweep::PerformCorner : This is not a corner !" << endl;
#endif
return;
}
else if ((TheTransition == BRepFill_Right) ||
aTrim.HasSection() ) {
-#if DEB
+#if BREPFILL_DEB
cout << "Fail of TrimCorner" << endl;
#endif
return; // Nothing is touched
if (ii==1) BordFirst = Bord1;
}
}
-#if DEB
+#if BREPFILL_DEB
else cout << "PerformCorner : Unsymmetry of free border" << endl;
#endif
}
&& ( Points2.Length() != Params.Length() ||
(Points2.Length() == 0 && Params.Length() == 0) ) ) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: incoherent intersection. Try with a greater tolerance" << endl;
#endif
SeanceDeRattrapage++;
}
-#ifdef DEB
+#ifdef BREPFILL_DEB
if(SeanceDeRattrapage != 0) cout << "SeanceDeRattrapage = " << SeanceDeRattrapage << endl;
if(SeanceDeRattrapage == nn) {
cout << "BRepFill_TrimEdgeTool: incoherent intersection" << endl;
Standard_Real P1xP2x=Abs( P1.X() - P2.X());
if ( P1xP2x > Tol ) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl;
#endif
if(P1xP2x>TolInit) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl;
#endif
i++;
}
if (ToProj) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << " project extremity bissectrice on parallel."<<endl;
#endif
Geom2dAPI_ProjectPointOnCurve Projector2(PBis,C2,f2,l2);
if (Projector1.NbPoints() == 0) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector1.NearestPoint().IsEqual(PBis,Tol)) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout <<"Incorrect solution in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (Projector2.NbPoints() == 0) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector2.NearestPoint().IsEqual(PBis,Tol)) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout <<" Mauvaisesolution dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
NbSegments = Intersector.NbSegments();
if (NbSegments > 0) {
-#ifdef DEB
+#ifdef BREPFILL_DEB
cout << " IntersectWith : " << NbSegments
<< " Segments of intersection" << endl;
#endif
// evaluate the projection of the point on the curve.
Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d);
-#ifdef DEB
- Standard_Real Dist =
-#endif
- Projector.LowerDistance();
-#ifdef DEB
+#ifdef BREPFILL_DEB
+ Standard_Real Dist = Projector.LowerDistance();
if ( Dist > Precision::Confusion() ) {
cout << " *** WARNING TrimSurfaceTool: *** " << endl;
cout << " --> the point is not on the edge" <<endl;
//Standard_Boolean tFE = TopOpeBRepBuild_GettraceFE();
//#endif
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : BuildListEdges "<<endl;
-//#endif
-
//--------------------------------------------------------
// Step One : Build the map ancestors
//--------------------------------------------------------
//Standard_Boolean tFE = TopOpeBRepBuild_GettraceFE();
//#endif
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : BuildListResultEdges "<<endl;
-//#endif
-
// if we have edges to fuse
if (myMapLstEdg.Extent() > 0) {
TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape itLstEdg;
}
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : Creating New Edge "<<endl;
-//#endif
-
BRepLib_MakeEdge ME;
Standard_Boolean isBSpline = C->DynamicType() == STANDARD_TYPE(Geom_BSplineCurve);
// the curve which is not infinite and limited to old vertices
// we try to use ExtendCurveToPoint, then rebuild the NewEdge
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : MakeEdge failed. Trying to Extend Curve "<<endl;
-//#endif
Handle(Geom_BoundedCurve) ExtC = Handle(Geom_BoundedCurve)::DownCast(C->Copy());
if (!ExtC.IsNull()) {
gp_Pnt PF = BRep_Tool::Pnt(VF);
NewEdge = ME.Edge();
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : Updating pcurve "<<endl;
-//#endif
if (UpdatePCurve(OldEdge,NewEdge,LmapEdg))
myMapEdg.Bind(iLst,NewEdge);
}
BuildListResultEdges();
}
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : Perform "<<endl;
-//#endif
-
// if we have fused edges
if (myMapEdg.Extent() > 0) {
TopTools_DataMapIteratorOfDataMapOfIntegerListOfShape itLstEdg;
}
}
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : Building New Shape "<<endl;
-//#endif
-
// perform the effective substitution
Bsub.Build(myShape);
myShape=(Bsub.Copy(myShape)).First();
}
-//#ifdef DEB
- //if (tFE) cout<<endl<<"FuseEdges : "<< NbVertices() <<" vertices removed"<<endl;
-//#endif
-
-
}
typC1 != STANDARD_TYPE(Geom_Ellipse) &&
typC1 != STANDARD_TYPE(Geom_BSplineCurve) &&
typC1 != STANDARD_TYPE(Geom_BezierCurve)) {
-#ifdef DEB
+#ifdef BREPLIB_DEB
cout << " TopOpeBRepTool_FuseEdge : Type de Support non traite" << endl;
#endif
return Standard_False;
if (V1.IsSame(myVertex)) VRef = V2;
else if (V2.IsSame(myVertex)) VRef = V1;
else {
-#if DEB
+#if BREPLIB_DEB
cout << "MakeWire : There is a PROBLEM !!" << endl;
#endif
myError = BRepLib_NonManifoldWire;
if (VF.IsSame(VL)) {
// Particular case: it is required to control the orientation
-#if DEB
+#if BREPLIB_DEB
if (!VF.IsSame(myVertex))
cout << "MakeWire : There is a PROBLEM !!" << endl;
#endif
if (VF.IsSame(myVertex)) VF = VRef;
else if (VL.IsSame(myVertex)) VL = VRef;
else {
-#if DEB
+#if BREPLIB_DEB
cout << "MakeWire : Y A UN PROBLEME !!" << endl;
#endif
myError = BRepLib_NonManifoldWire;
}
else {
//Mixed not finished!
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout <<" faces locally mixed"<<endl;
#endif
I.Type(BRepOffset_Convex);
mapEdgeType(E).Append(Inter);
}
else {
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout <<"edge shared by more than two faces"<<endl;
#endif
}
Standard_Real aT2 = ResParamsOnE2(i); //ponc2.Parameter();
if (Precision::IsInfinite(aT1) || Precision::IsInfinite(aT2))
{
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout << "Inter2d : Solution rejected due to infinite parameter"<<endl;
#endif
continue;
dist1 = Max( dist1, dist3 );
B.UpdateVertex( aNewVertex, dist1 );
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "out of limit"<<endl;
if (E1.Orientation() == TopAbs_REVERSED) V1or.Reverse();
if (E2.Orientation() == TopAbs_REVERSED) V2or.Reverse();
Standard_Real CrossProd = V2or ^ V1;
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if (Abs(CrossProd) <= gp::Resolution())
cout<<endl<<"CrossProd = "<<CrossProd<<endl;
#endif
Standard_Real aT2 = ResParamsOnE2(i); //ponc2.Parameter();
if (Precision::IsInfinite(aT1) || Precision::IsInfinite(aT2))
{
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout << "Inter2d : Solution rejected due to infinite parameter"<<endl;
#endif
continue;
dist1 = Max( dist1, dist3 );
B.UpdateVertex( aNewVertex, dist1 );
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "out of limit"<<endl;
if (E1.Orientation() == TopAbs_REVERSED) V1or.Reverse();
if (E2.Orientation() == TopAbs_REVERSED) V2or.Reverse();
Standard_Real CrossProd = V2or ^ V1;
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if (Abs(CrossProd) <= gp::Resolution())
cout<<endl<<"CrossProd = "<<CrossProd<<endl;
#endif
Projector.Init( P1, C3d );
if (Projector.NbPoints() > 0)
f = Projector.LowerDistanceParameter();
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
else
cout<<"ProjectPointOnCurve not done"<<endl;
#endif
Projector.Init( P2, C3d );
if (Projector.NbPoints() > 0)
l = Projector.LowerDistanceParameter();
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
else
cout<<"ProjectPointOnCurve not done"<<endl;
#endif
YaResult = 1;
Glue.Add (exp.Current().Reversed());
}
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if(YaResult == 0)
{
cout << "OffsetShape does not contain a FACES." << endl;
}
#endif
}
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
else
{
cout << "OffsetShape is null!" << endl;
Edge3 = TopoDS::Edge(aLocalEdge);
// Edge3 = TopoDS::Edge(FirstEdge.Oriented(TopAbs_FORWARD));
TopExp::Vertices(Edge3,VVf,VVl);
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
// si firstedge n est pas nul, il faut que les vertex soient partages
if ( !VVf.IsSame(V1f) && !VVf.IsSame(V2f) ) {
cout << "Attention Vertex non partages !!!!!!" << endl;
Edge4 = TopoDS::Edge(aLocalEdge);
// Edge4 = TopoDS::Edge(LastEdge.Oriented(TopAbs_FORWARD));
TopExp::Vertices(Edge4,VVf,VVl);
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
// si lastedge n est pas nul, il faut que les vertex soient partages
if ( !VVf.IsSame(V1l) && !VVf.IsSame(V2l) ) {
cout << "Attention Vertex non partages !!!!!!" << endl;
TopoDS_Edge anEdge = TopoDS::Edge(eseq(i));
BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
Standard_Real EdgeTol = BRep_Tool::Tolerance(anEdge);
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout<<"Tolerance of glued E = "<<EdgeTol<<endl;
#endif
if (EdgeTol > 1.e-2)
{
ReconstructPCurves(anEdge);
BRepLib::SameParameter(anEdge, aSameParTol, Standard_True);
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout<<"After projection tol of E = "<<BRep_Tool::Tolerance(anEdge)<<endl;
#endif
}
Standard_Real U1on2 = IntP2.ParamOnFirst();
Standard_Real U2on1 = IntP1.ParamOnSecond();
Standard_Real U2on2 = IntP2.ParamOnSecond();
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
cout << " BRepOffset_Tool::Inter2d SEGMENT d intersection" << endl;
cout << " ===> Parametres sur Curve1 : ";
cout << U1on1 << " " << U1on2 << endl;
LV.Clear();LV.Append(VF); LV.Append(VL);
}
-#ifdef DEB
+#ifdef BREPOFFSET_DEB
if (!YaSol) {
cout <<"Inter2d : Pas de solution"<<endl;
#ifdef DRAW
}
catch(...) //Every exception was caught.
{
+#ifdef BREPOFFSETAPI_DEB
cout<<"An exception was caught in BRepOffsetAPI_MakeOffset::Perform : ";
Standard_ConstructionError::Caught()->Print(cout);
cout<<endl;
+#endif
NotDone();
myShape.Nullify();
}
shape.Location ( nullLoc );
}
-#ifdef DEB
+#ifdef BREPTOOLS_DEB
if ( IsRecorded ( shape ) && ((myConsiderLocation && ! Value ( shape ).IsPartner ( newshape )) ||
(!myConsiderLocation && ! Value ( shape ).IsSame ( newshape ))))
cout << "Warning: BRepTools_ReShape::Replace: shape already recorded" << endl;
}//if(nbpoints>3
else
{
-#ifdef DEB
+#ifdef BREPTOPADAPTOR_DEB
cout << endl;
cout << "*** BRepTopAdaptor_Fclass2d ** Wire Probably FALSE **" << endl;
cout << "*** The sample wire contains less than 3 points" << endl;
//const BRepTopAdaptor_FClass2d & BRepTopAdaptor_FClass2d::Copy(const BRepTopAdaptor_FClass2d& Other) const {
const BRepTopAdaptor_FClass2d & BRepTopAdaptor_FClass2d::Copy(const BRepTopAdaptor_FClass2d& ) const {
+#ifdef BREPTOPADAPTOR_DEB
cerr<<"Copy not allowed in BRepTopAdaptor_FClass2d"<<endl;
+#endif
Standard_ConstructionError::Raise();
return(*this);
}
return(myTopolTool);
}
else {
+#ifdef BREPTOPADAPTOR_DEB
cout<<"\n*** Error ds Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetTopolTool()\n"<<endl;
+#endif
return(myTopolTool);
}
}
return(myHSurface);
}
else {
+#ifdef BREPTOPADAPTOR_DEB
cout<<"\n*** Error ds Handle(BRepTopAdaptor_TopolTool) BRepTopAdaptor_Tool::GetSurface()\n"<<endl;
+#endif
return(myHSurface);
}
}
Standard_Real& KnotsResult,
Standard_Real& PolesResult)
{
-#if DEB
+#if BSPLCLIB_DEB
if (CDegree<Continuity+1) {
cout<<"The BSpline degree must be greater than the order of continuity"<<endl;
}
{
Handle(Geom_Curve) C;
-#if DEB
+#if BITGTE_DEB
OSD_Chronometer ch;
ChFi3d_InitChron(ch);
#endif
Conv.Degree());
}
-#if DEB
+#if BITGTE_DEB
ChFi3d_ResultChron(ch, t_mkcurve);
#endif
myShape = SewedShape;
// end Sewing for false free borders.
-#if DEB
+#if BITGTE_DEB
OSD_Chronometer cl_total, ch;
Standard_Real t_total, t_center, t_surface, t_shape;
// ----------------------------------------------
// Calculate lines of centers and of surfaces
// ----------------------------------------------
-#if DEB
+#if BITGTE_DEB
ChFi3d_InitChron(ch);
#endif
ComputeCenters();
-#if DEB
+#if BITGTE_DEB
ChFi3d_ResultChron(ch, t_center);
#endif
// -----------------------------
// Calculate connection Surfaces
// -----------------------------
-#if DEB
+#if BITGTE_DEB
ChFi3d_InitChron(ch);
#endif
ComputeSurfaces();
-#if DEB
+#if BITGTE_DEB
ChFi3d_ResultChron(ch, t_surface);
#endif
// ----------------------------------
// Calculate the generated shape if required
// ----------------------------------
-#if DEB
+#if BITGTE_DEB
ChFi3d_InitChron(ch);
#endif
if ( myBuildShape) ComputeShape();
-#if DEB
+#if BITGTE_DEB
ChFi3d_ResultChron(ch, t_shape);
#endif
// since the partition is provided ( A Priori);
BRepLib::BuildCurves3d(myResult, Precision::Confusion());
-#ifdef DEB
+#ifdef BITGTE_DEB
ChFi3d_ResultChron(cl_total, t_total);
cout<<endl;
cout<<"Blend_PERFORM: temps total "<<t_total<<" s dont :"<<endl;
}
}
-#ifdef DEB
+#ifdef BITGTE_DEB
if ( myResult.IsNull()) {
cout << " No Lines of Generated Centers" << endl;
}
Handle(Geom2d_Curve) PC2 =
BRep_Tool::CurveOnSurface(CurCutE,F2,f2,l2);
if ( PC1.IsNull() || PC2.IsNull()) {
-#ifdef DEB
+#ifdef BITGTE_DEB
cout << "No PCurves on Intersections : No tubes constructed";
cout << endl;
#endif
InitShape2.ShapeType() == TopAbs_EDGE &&
myStopFaces.Contains(InitShape2);
-#ifdef DEB
+#ifdef BITGTE_DEB
if ( F1surBordLibre && F2surBordLibre) {
cout << "Rejection : 2 tubes on free border are not intersected";
cout << endl;
if ( Done.Add(V1)) {
Standard_Boolean IsOnR1 = IsOnRestriction(V1,CurE,Face,E1);
Standard_Boolean IsOnR2 = IsOnRestriction(V1,CurE,F2,E2);
-#ifdef DEB
+#ifdef BITGTE_DEB
if (IsOnR1 && IsOnR2) {
cout << "Leave in the same tps on 2 faces, ";
cout << "propagation only on free border";
// Leave in the same tps on 2 faces, propagate only on
// free borders.
// A priori, only facet is closed.
-#ifdef DEB
+#ifdef BITGTE_DEB
if (IsOnR1 && IsOnR2) {
cout << "Leave with the same tps on 2 faces, ";
cout << "propagate only if the border is free";
{
if (theGUID == BinStorageDriver)
{
+#ifdef BINDRIVERS_DEB
cout << "BinDrivers : Storage Plugin" << endl;
+#endif
static Handle(BinDrivers_DocumentStorageDriver) model_sd =
new BinDrivers_DocumentStorageDriver;
return model_sd;
if (theGUID == BinRetrievalDriver)
{
+#ifdef BINDRIVERS_DEB
cout << "BinDrivers : Retrieval Plugin" << endl;
+#endif
static Handle(BinDrivers_DocumentRetrievalDriver) model_rd =
new BinDrivers_DocumentRetrievalDriver;
return model_rd;
{
if (theGUID == BinLStorageDriver)
{
+#ifdef BINLDRIVERS_DEB
cout << "BinLDrivers : Storage Plugin" << endl;
+#endif
static Handle(BinLDrivers_DocumentStorageDriver) model_sd =
new BinLDrivers_DocumentStorageDriver;
return model_sd;
if (theGUID == BinLRetrievalDriver)
{
+#ifdef BINLDRIVERS_DEB
cout << "BinLDrivers : Retrieval Plugin" << endl;
+#endif
static Handle(BinLDrivers_DocumentRetrievalDriver) model_rd =
new BinLDrivers_DocumentRetrievalDriver;
return model_rd;
ofstream anOS (aFileName.ToCString(), ios::ate);
//ofstream anOS (aFileName.ToCString(), ios::out| ios::binary | ios::ate);
#endif
-#ifdef DEB
+#ifdef BINLDRIVERS_DEB
const Standard_Integer aP = (Standard_Integer) anOS.tellp();
cout << "POS = " << aP <<endl;
#endif
#endif
SetIsError(Standard_True);
}
-#ifdef DEB
+#ifdef BINLDRIVERS_DEB
const Standard_Integer aP = (Standard_Integer) aFileDriver.Tell();
cout << "POS = " << aP <<endl;
#endif
const Handle(TDF_Attribute)& theTarget,
BinObjMgt_RRelocationTable& ) const
{
-#ifdef DEB
-// cout << "ByteArrayDriver::Retrieve: " << TypeName() << endl;
-#endif
Standard_Integer aFirstInd, aLastInd;
if (! (theSource >> aFirstInd >> aLastInd))
return Standard_False;
bytes->SetValue(i, aTargetArray.Value(i));
}
anAtt->ChangeArray(bytes);
-#ifdef DEB
- //cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-#endif
+
Standard_Boolean aDelta(Standard_False);
if(BinMDataStd::DocumentVersion() > 2) {
Standard_Byte aDeltaValue;
BinObjMgt_Persistent& theTarget,
BinObjMgt_SRelocationTable& ) const
{
-#ifdef DEB
-// cout << "ByteArrayDriver::Store: " << TypeName() << endl;
-#endif
Handle(TDataStd_ByteArray) anAtt = Handle(TDataStd_ByteArray)::DownCast(theSource);
const Standard_Integer aFirstInd = anAtt->Lower();
const Standard_Integer aLastInd = anAtt->Upper();
}
if(ok) {
-//#ifdef DEB
-// cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-//#endif
Standard_Boolean aDelta(Standard_False);
if(BinMDataStd::DocumentVersion() > 2) {
Standard_Byte aDeltaValue;
if (! (theSource >> aDeltaValue)) {
-//#ifdef DEB
-// cout <<"DeltaValue = " << (Standard_Integer)aDeltaValue <<endl;
-//#endif
return Standard_False;
}
else
}
aTagAtt->ChangeMap(aHMap);
}
-#ifdef DEB
- //cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-#endif
+
Standard_Boolean aDelta(Standard_False);
if(BinMDataStd::DocumentVersion() > 2) {
Standard_Byte aDeltaValue;
if(!theSource.GetIntArray (&aTargetArray(aFirstInd), aLength))
return Standard_False;
Standard_Boolean aDelta(Standard_False);
-#ifdef DEB
- //cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-#endif
if(BinMDataStd::DocumentVersion() > 2) {
Standard_Byte aDeltaValue;
if (! (theSource >> aDeltaValue))
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef BINMDATASTD_DEB
else if(BinMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
TColStd_Array1OfReal& aTargetArray = anAtt->Array()->ChangeArray1();
if(!theSource.GetRealArray (&aTargetArray(aFirstInd), aLength))
return Standard_False;
-#ifdef DEB
- //cout << "CurDocVersion = " << BinMDataStd::DocumentVersion() <<endl;
-#endif
+
Standard_Boolean aDelta(Standard_False);
if(BinMDataStd::DocumentVersion() > 2) {
Standard_Byte aDeltaValue;
WriteMessage (aMsg);
}
-#ifdef DEB
- //cout << "CurDocVersion = " << BinMNaming::DocumentVersion() <<endl;
-#endif
if(BinMNaming::DocumentVersion() > 3) {
TCollection_AsciiString entry;
ok = theSource >> entry;
if(ok) {
-#ifdef DEB
+#ifdef BINMNAMING_DEB
cout << "NamingDriver:: Retrieved Context Label = " << entry << " Ok = " << theSource.IsOK() <<endl;
#endif
if(ok) {
OrientationToApply = (TopAbs_Orientation)anIndx;
aName.Orientation(OrientationToApply);
-#ifdef DEB
+#ifdef BINMNAMING_DEB
cout << "NamingDriver:: Retrieved Orientation = " << OrientationToApply << " Ok = " << theSource.IsOK() <<endl;
#endif
} else {
}
}
}
-#ifdef DEB
+#ifdef BINMNAMING_DEB
else if(BinMNaming::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
else
// The location is not identity
if( myLocations == 0 )
{
-#ifdef DEB
+#ifdef BINMXCAFDOC_DEB
cout<<"Pointer to LocationSet is NULL\n";
#endif
return;
{
if(aGUID == BinStorageDriver)
{
+#ifdef BINTOBJDRIVERS_DEB
cout << "BinTObjDrivers : Storage Plugin" << endl;
+#endif
static Handle(BinTObjDrivers_DocumentStorageDriver) model_sd
= new BinTObjDrivers_DocumentStorageDriver;
return model_sd;
if(aGUID == BinRetrievalDriver)
{
+#ifdef BINTOBJDRIVERS_DEB
cout << "BinTObjDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (BinTObjDrivers_DocumentRetrievalDriver) model_rd
= new BinTObjDrivers_DocumentRetrievalDriver;
return model_rd;
void BinTools_Curve2dSet::Read(Standard_IStream& IS)
{
char buffer[255];
-#ifdef DEB
-// const Standard_Integer aPos = IS.tellg();
-// cout << "\tPosition of Curves2d section = " << aPos << endl;
-#endif
+
IS >> buffer;
if (IS.fail() || strcmp(buffer,"Curve2ds")) {
Standard_SStream aMsg;
aMsg << "BinTools_Curve2dSet::Read: Not a Curve2d table"<<endl;
-#ifdef DEB
+#ifdef BINTOOLS_DEB
cout <<"Curve2dSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);
if (IS.fail() || strcmp(buffer,"Curves")) {
Standard_SStream aMsg;
aMsg << "BinTools_CurveSet::Read: Not a Curve table"<<endl;
-#ifdef DEB
+#ifdef BINTOOLS_DEB
cout <<"CurveSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);
Handle(Poly_PolygonOnTriangulation) Poly;
IS >> nbpol;
IS.get();//remove LF
-#ifdef DEB
-// cout << "ReadPolygonOnTriangulation: NbPoles = "<< nbpol<< endl;
-#endif
try {
OCC_CATCH_SIGNALS
for (i=1; i<=nbpol; i++) {
-#ifdef DEB
-// streampos pos = IS.tellg();
-// cout << "ReadPolygonOnTriangulation: Pos = "<< pos << endl;
-#endif
BinTools::GetInteger(IS, nbnodes);
-#ifdef DEB
-// cout << "ReadPolygonOnTriangulation: PoleIndx = "<< i << " NbOfNodes = "<< nbnodes <<endl;
-#endif
-
TColStd_Array1OfInteger Nodes(1, nbnodes);
for (j = 1; j <= nbnodes; j++) {
BinTools::GetInteger(IS, val);
if (IS.fail() || strstr(buffer,"Polygon3D") == NULL) {
aMsg << "BinTools_ShapeSet::ReadPolygon3D: Not a Polygon3D section" <<endl;
-#ifdef DEB
+#ifdef BINTOOLS_DEB
cout <<"Buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);
Standard_Integer i,j,udegree,vdegree;
udegree = S->UDegree();
vdegree = S->VDegree();
-#ifdef DEB
-// cout << "\tudegree = " << udegree << ", vdegree = "<< vdegree<<endl;
-#endif
BinTools::PutExtChar(OS, (Standard_ExtCharacter)udegree);
BinTools::PutExtChar(OS, (Standard_ExtCharacter)vdegree);
for (i = 1; i <= udegree+1; i++) {
for (j = 1; j <= vdegree+1; j++) {
OS << S->Pole(i,j); //Pnt
-#ifdef DEB
-// cout << "Bezier Surface: Pole Pnt: X = " << S->Pole(i,j).X()<< " Y = " << S->Pole(i,j).Y()<<" Z = " << S->Pole(i,j).Z()<<endl;
-#endif
if (urational || vrational) {
BinTools::PutReal(OS, S->Weight(i,j));//Real
-#ifdef DEB
-// cout << "Bezier Surface: Put Real" << endl;
-#endif
}
}
}
-#ifdef DEB
-// const Standard_Integer aPos = OS.tellp();
-// cout << "\tEnd of Bezier surface pos = " << aPos << endl;
-#endif
return OS;
}
try {
OCC_CATCH_SIGNALS
const Standard_Byte stype = (Standard_Byte) IS.get();
-#ifdef DEB
-// cout << "ReadSurface: Surface type = " << (Standard_Integer)stype <<endl;
-#endif
switch (stype) {
case PLANE :
if (IS.fail() || strcmp(buffer,"Surfaces")) {
Standard_SStream aMsg;
aMsg << "BinTools_SurfaceSet::Read: Not a surface table"<<endl;
-#ifdef DEB
+#ifdef BINTOOLS_DEB
cout <<"SurfaceSet buffer: " << buffer << endl;
#endif
Standard_Failure::Raise(aMsg);
if (theGUID == BinXCAFStorageDriver)
{
+#ifdef BINXCAFDRIVERS_DEB
cout << "BinXCAFDrivers : Storage Plugin" << endl;
+#endif
static Handle(BinXCAFDrivers_DocumentStorageDriver) model_sd =
new BinXCAFDrivers_DocumentStorageDriver;
return model_sd;
if (theGUID == BinXCAFRetrievalDriver)
{
+#ifdef BINXCAFDRIVERS_DEB
cout << "BinXCAFDrivers : Retrieval Plugin" << endl;
+#endif
static Handle(BinXCAFDrivers_DocumentRetrievalDriver) model_rd =
new BinXCAFDrivers_DocumentRetrievalDriver;
return model_rd;
InternalPerform(Func,FuncInv,Pmax);
-#ifdef DEB
-// cout <<"Perform : "<<nbcomputedsection<<" sections calculees"<<endl;
-// cout <<line->NbPoints()<<" sections gardees"<<endl;
-#endif
-
done = Standard_True;
}
InternalPerform(Func,FuncInv,Pmin);
-#ifdef DEB
-// cout <<"Complete : "<<nbcomputedsection<<" sections calculees"<<endl;
-// cout <<line->NbPoints()<<" sections gardees"<<endl;
-#endif
-
iscomplete = Standard_True;
return Standard_True;
}
TheSurfaceTool::LastVParameter(surf),
stat, thenormal, iu, iv);
normale.SetXYZ(thenormal.XYZ());
-#if DEB
+#if BLEND_DEB
if (stat == CSLib_InfinityOfSolutions)
cout << "Blend_Walking::Transition : Infinite de Normal" << endl;
#endif
if (stepw > 2*tolgui) State = Blend_StepTooLarge;
// Sinon echec recadrage. On sort avec PointsConfondus
else {
-#if DEB
+#if BLEND_DEB
cout << "Echec recadrage" << endl;
#endif
State = Blend_SamePoints;
case Blend_SamePoints :
{
// On arrete
-#if DEB
+#if BLEND_DEB
cout << " Points confondus dans le cheminement" << endl;
#endif
Ext1.SetValue(previousP.PointOnS1(),
norm = ncrossns.Magnitude();
if (norm < Eps) {
norm = 1.;
-//#if DEB
-// cout << "CSCircular : Surface singuliere !" << endl;
-//#endif
}
temp.SetXYZ(pts.XYZ() - ptc.XYZ());
Standard_Real norm = nplan.Crossed(ns).Magnitude();
if (norm < Eps) {
norm = 1.;
-//#if DEB
-// cout << "CSCircular : Surface singuliere !" << endl;
-//#endif
}
ns.SetLinearForm(nplan.Dot(ns)/norm,nplan, -1./norm,ns);
norm = ncrossns.Magnitude();
if (norm < Eps) {
norm = 1.;
-//#if DEB
-// cout << "CSCircular : Surface singuliere !" << endl;
-//#endif
}
ndotns = nplan.Dot(ns);
norm = ncrossns.Magnitude();
if (norm < Eps) {
norm = 1.;
-//#if DEB
-// cout << "CSCircular : Surface singuliere !" << endl;
-//#endif
}
ndotns = nplan.Dot(ns);
if (invnorm1 > Eps) invnorm1 = ((Standard_Real) 1) /invnorm1;
else {
invnorm1 = 1; // Unsatisfactory, but it is not necessary to crash
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
if (invnorm2 > Eps) invnorm2 = ((Standard_Real) 1) /invnorm2;
else {
invnorm2 = 1; // Unsatisfactory, but it is not necessary to crash
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
Abs(controle(2)) > tolerances(2) ||
Abs(controle(3)) > tolerances(3) ||
Abs(controle(4)) > tolerances(4)){
-#ifdef DEB
+#ifdef BLENDFUNC_DEB
cout<<"Cheminement : echec calcul des derivees"<<endl;
#endif
istangent = Standard_True;
(U2!=xval(3)) || (V2!=xval(4))) {
gp_Vec d1u,d1v;
gp_Pnt bid;
-//#if DEB
-// cout << " ConstRad::erreur de tengent !!!!!!!!!!!!!!!!!!!!" << endl;
-//#endif
surf1->D1(U1,V1,bid,d1u,d1v);
NmF = ns1 = d1u.Crossed(d1v);
surf2->D1(U2,V2,bid,d1u,d1v);
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-//#if DEB
-// cout << " ConstRad : Surface singuliere " << endl;
-//#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-//#if DEB
-// cout << " ConstRad : Surface singuliere " << endl;
-//#endif
}
ns1.SetLinearForm(nplan.Dot(ns1)/norm1,nplan, -1./norm1,ns1);
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRad : Surface singuliere " << endl;
#endif
}
Standard_Real norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1;
-//#if DEB
-// cout << " ConstRadInv : Surface singuliere " << endl;
-//#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-//#if DEB
-// cout << " ConstRadInv : Surface singuliere " << endl;
-//#endif
}
gp_Vec resul;
norm2 = ncrossns2.Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRadInv : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRadInv : Surface singuliere " << endl;
#endif
}
norm2 = ncrossns2.Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRadInv : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " ConstRadInv : Surface singuliere " << endl;
#endif
}
if (invnorm1 > Eps) invnorm1 = ((Standard_Real) 1) /invnorm1;
else {
invnorm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
if (invnorm2 > Eps) invnorm2 = ((Standard_Real) 1) /invnorm2;
else {
invnorm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
Abs(controle(2)) > tolerances(2) ||
Abs(controle(3)) > tolerances(3) ||
Abs(controle(4)) > tolerances(4)){
-#ifdef DEB
+#ifdef BLENDFUNC_DEB
cout<<"Cheminement : echec calcul des derivees"<<endl;
#endif
istangent = Standard_True;
(U2!=xval(3)) || (V2!=xval(4))) {
gp_Vec d1u,d1v;
gp_Pnt bid;
-#if DEB
+#if BLENDFUNC_DEB
cout << " erreur de tengent !!!!!!!!!!!!!!!!!!!!" << endl;
#endif
surf1->D1(U1,V1,bid,d1u,d1v);
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
norm2 = nplan.Crossed(ns2).Magnitude();
if (norm1 < Eps) {
norm1 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
if (norm2 < Eps) {
norm2 = 1; // Unsatisfactory, but it is not necessary to stop
-#if DEB
+#if BLENDFUNC_DEB
cout << " EvolRad : Surface singuliere " << endl;
#endif
}
if (norm1 < Eps) {
norm1 = 1.;
-//#if DEB
-// cout << "EvolRadInv : Surface singuliere " << endl;
-//#endif
}
if (norm2 < Eps) {
norm2 = 1.;
-//#if DEB
-// cout << "EvolRadInv : Surface singuliere " << endl;
-//#endif
}
gp_Vec resul;
Standard_Real norm2 = ncrossns2.Magnitude();
if (norm1 < Eps) {
norm1 = 1.;
-//#if DEB
-// cout << "EvolRadInv : Surface singuliere " << endl;
-//#endif
}
if (norm2 < Eps) {
norm2 = 1.;
-//#if DEB
-// cout << "EvolRadInv : Surface singuliere " << endl;
-//#endif
}
gp_Vec resul1,resul2;
//=======================================================================
const CSLib_Class2d& CSLib_Class2d::Copy(const CSLib_Class2d& ) const
{
+#ifdef CSLIB_DEB
cerr<<"Copy not allowed in CSLib_Class2d"<<endl;
+#endif
Standard_ConstructionError::Raise();
return *this;
}
}
}
else {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"ConcaveSide : no concave face"<<endl;
#endif
//This 10 shows that the face at end is in the extension of one of two base faces
}
catch(Standard_Failure) {
Handle(Standard_Failure) exc = Standard_Failure::Caught();
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"EXCEPTION Stripe compute " << exc << endl;
#endif
badstripes.Append(itel.Value());
catch(Standard_Failure)
{
Handle(Standard_Failure) exc = Standard_Failure::Caught();
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"EXCEPTION Corner compute " << exc << endl;
#endif
badvertices.Append(myVDataMap.FindKey(j));
}
catch(Standard_Failure) {
Handle(Standard_Failure) exc = Standard_Failure::Caught();
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"EXCEPTION Fillets compute " << exc << endl;
#endif
badstripes.Append(itel.Value());
// display of time for perfs
#ifdef DEB
- cout<<endl;
- cout<<"COMPUTE: temps total "<<t_total<<"s dont :"<<endl;
- cout<<"- Init + ExtentAnalyse "<<t_extent<<"s"<<endl;
- cout<<"- PerformSetOfSurf "<<t_perfsetofsurf<<"s"<<endl;
- cout<<"- PerformFilletOnVertex "<<t_perffilletonvertex<<"s"<<endl;
- cout<<"- FilDS "<<t_filds<<"s"<<endl;
- cout<<"- Reconstruction "<<t_reconstruction<<"s"<<endl;
- cout<<"- SetRegul "<<t_setregul<<"s"<<endl<<endl;
-
if(ChFi3d_GettraceCHRON()){
+ cout<<endl;
+ cout<<"COMPUTE: temps total "<<t_total<<"s dont :"<<endl;
+ cout<<"- Init + ExtentAnalyse "<<t_extent<<"s"<<endl;
+ cout<<"- PerformSetOfSurf "<<t_perfsetofsurf<<"s"<<endl;
+ cout<<"- PerformFilletOnVertex "<<t_perffilletonvertex<<"s"<<endl;
+ cout<<"- FilDS "<<t_filds<<"s"<<endl;
+ cout<<"- Reconstruction "<<t_reconstruction<<"s"<<endl;
+ cout<<"- SetRegul "<<t_setregul<<"s"<<endl<<endl;
+
cout<<endl;
cout <<"temps PERFORMSETOFSURF "<<t_perfsetofsurf <<"s dont : "<<endl;
cout <<"- SetofKPart "<<t_perfsetofkpart<<"s"<<endl;
E[i] = Ec;
}
else{
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"top has more than 3 edges"<<endl;
#endif
sommetpourri = Standard_True;
}
if(nbf>3) {
Spine->SetFirstStatus(ChFiDS_BreakPoint);
-#if DEB
+#if CHFI3D_DEB
cout<<"top has : "<<nbf<<" faces."<<endl;
#endif
}
}
if(nbf>3) {
Spine->SetLastStatus(ChFiDS_BreakPoint);
-#if DEB
+#if CHFI3D_DEB
cout<<"top has : "<<nbf<<" faces."<<endl;
#endif
}
TopoDS_Edge E;
if (Pc.IsVertex()){
// attention it is necessary to analyze all faces that turn around of the vertex
-#if DEB
+#if CHFI3D_DEB
cout<<"Commonpoint on vertex, the process hangs up"<<endl;
#endif
if (Pc.HasVector()) { //General processing
FindFace = Standard_False;
if (Spine.IsNull()) {
//La Spine peut etre nulle (ThreeCorner)
-#if DEB
+#if CHFI3D_DEB
cout << "FindFace sur vertex avec spine nulle! QUEZAKO ?" << endl;
#endif
return Standard_False;
if (CV1.IsVertex()) {
ChFi3d_SingularExtremity(Stripe, DStr, CV1.Vertex(), tol3d, tol2d);
}
-# if DEB
+# if CHFI3D_DEB
else { cout << "MakeExtremities : Singularity out of Vertex !!" << endl; }
# endif
}
if (cpdeb1.IsVertex()) {
ChFi3d_SingularExtremity(Stripe, DStr, cpdeb1.Vertex(), tol3d, tol2d);
}
-# if DEB
+# if CHFI3D_DEB
else { cout << "MakeExtremities : Singularity out of Vertex !!" << endl; }
# endif
}
if (cpfin1.IsVertex()) {
ChFi3d_SingularExtremity(Stripe, DStr, cpfin1.Vertex(), tol3d, tol2d);
}
-# if DEB
+# if CHFI3D_DEB
else { cout << "MakeExtremities : Singularity out of Vertex !!" << endl; }
# endif
}
Standard_Integer opp = 3-ons;
if (!SD->Vertex(isfirst,opp).IsOnArc() ||
SD->TwistOnS1() || SD->TwistOnS2() ) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"ChFi3d_Purge : No output on extension."<<endl;
#endif
ChFiDS_SequenceOfSurfData& Seq =
ChFiDS_SequenceOfSurfData LSD;
if(!ChFiKPart_ComputeData::Compute(DStr,SD,HS1,HS2,Or1,Or2,Spine,iedge)){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"failed calculation KPart"<<endl;
#endif
}
else if(!SplitKPart(SD,LSD,Spine,iedge,HS1,It1,HS2,It2,intf,intl)){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"failed calculation KPart"<<endl;
#endif
LSD.Clear();
}
else if(IF < IL){
TColStd_Array1OfReal wv(IF,IL - 1);
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"length of the trajectory : "<<(WL-WF)<<endl;
#endif
for(i = IF; i < IL; i++){
Standard_Real wi = Spine->LastParameter(iloc);
if(periodic) wi = ElCLib::InPeriod(wi,WF,WF+period);
gp_Pnt pv = Spine->Value(wi);
-#ifdef DEB
+#ifdef CHFI3D_DEB
gp_Pnt pelsapp = curels.Value(wi);
Standard_Real distinit = pv.Distance(pelsapp);
cout<<"distance psp/papp : "<<distinit<<endl;
wv(i) = ext.Point().Parameter();
}
else {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"fail of projection vertex ElSpine!!!"<<endl;
#endif
}
}
else {
//(2) Intersection
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<< "CompParam : bad intersection parameters"<<endl;
#endif
IntRes2d_IntersectionPoint int2d;
if (!Intersection.IsEmpty()){
nbseg = Intersection.NbSegments();
if ( nbseg > 0 ){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<< "segments of intersection on the restrictions"<<endl;
#endif
}
if(!found){
// (3) Projection...
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout<<"CompParam : failed proj p2d/c2d, the extremity is taken!" <<endl;
#endif
}
tolappangle, // Contact G1
myConti, Degmax, Segmax);
if (!approx.IsDone()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Approximation non faite !!!" << endl;
#endif
return Standard_False;
}
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout << "Approximation is not done!" << endl;
#endif
return Standard_False;
}
-#ifdef DEB
+#ifdef CHFI3D_DEB
approx.Dump(cout);
#endif
tolappangle, // Contact G1
myConti);
if (!approx.IsDone()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Approximation non faite !!!" << endl;
#endif
return Standard_False;
}
-#ifdef DEB
+#ifdef CHFI3D_DEB
approx.Dump(cout);
#endif
chc.Load(Crv3d1,par1,par2);
if(!ChFi3d_CheckSameParameter(checkcurve,PCurveOnFace,S1,tolC1,tolcheck)){
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout<<"ChFi3d_Builder::ComputeData : calculation fail first section"<<endl;
#endif
return Standard_False;
MS,TolGuide,ParSol,tolesp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Path not created" << endl;
#endif
return Standard_False;
if (reverse) {
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout<<"ChFi3d_Builder::ComputeData : fail calculation first section"<<endl;
#endif
return Standard_False;
MS, TolGuide, ParSol, tolesp, Fleche, Appro);
if (!TheWalk.IsDone()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Path not done" << endl;
#endif
return Standard_False;
if (reverse) {
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"one point of path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt<=nbptmin && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout << "Path not done" << endl;
#endif
return Standard_False;
}
if (reverse) {
if (!TheWalk.Complete(Func,FInv,FInvP,FInvC,SpLast)) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"one point of path MS/50 is attempted."<<endl;
#endif
MS = MS/50.; Target = Targetsov;
}
else if (Nbpnt <= NbSecMin && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout << "Path not created" << endl;
#endif
return Standard_False;
}
if (reverse) {
if (!TheWalk.Complete(Func, FInv1, FInvP1, FInv2, FInvP2, SpLast)) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
}
Nbpnt = Lin->NbPoints();
if (Nbpnt <= 1 && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
return Standard_False;
//- if one has gone far enough.
Nbpnt = Lin->NbPoints();
if (Nbpnt == 0){
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout <<"If it drags without control, quit."<<endl;
#endif
return Standard_False;
tchernobyl = Standard_True;
TheWalk.Check(0);
if (Nbpnt == 1){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"only one point of path MS/100 is attempted"<<endl;
cout <<"and the controls are extended."<<endl;
#endif
MS *= 0.01;
}
else{
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"It drags, the controls are extended."<<endl;
#endif
MS = (lpointpar-fpointpar)/Nbpnt; //EvalStep(Lin);
}
else if (Nbpnt < nbptmin){
if(again == 0){
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout <<"Number of points is still too small, the step is reduced"<<endl;
#endif
MS = (lpointpar - fpointpar) * factor;
}
else{
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if(TheWalk.TwistOnS1()){
Data->TwistOnS1(Standard_True);
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"Path completed, but TWIST on S1"<<endl;
#endif
}
if(TheWalk.TwistOnS2()){
Data->TwistOnS2(Standard_True);
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"Parh completed, but TWIST on S2"<<endl;
#endif
}
if(!TheWalk.PerformFirstSection(Func,FInv,PFirst,Target,Soldep,
tolesp,TolGuide,RecOnS1,RecOnS2,
NewFirst,ParSol)){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"ChFi3d_Builder::SimulData : calculation fail first section"<<endl;
#endif
return Standard_False;
ParSol,TolEsp,Fleche,Appro);
if (!TheWalk.IsDone()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout << "Not completed" << endl;
#endif
return Standard_False;
Nbpnt = Lin->NbPoints();
Standard_Real factor = 1./(NbSecMin + 1);
if (Nbpnt == 0){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"0 point of path, quit."<<endl;
#endif
return Standard_False;
}
else if (Nbpnt == 1 && again == 0) {
again++;
-#ifdef DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
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 DEB
+#ifdef CHFI3D_DEB
cout <<"Number of points is still too small, the step is reduced"<<endl;
#endif
MS /= 100;
Target = Targetsov;
}
else{
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
}
}
else if(Nbpnt < NbSecMin){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout <<"Number of points is still too small, quit"<<endl;
#endif
return Standard_False;
if (Ishape1 > 0) {
trafil1 = DStr.Shape(Ishape1).Orientation();
}
-#ifdef DEB
+#ifdef CHFI3D_DEB
else {
cout<<"erreur"<<endl;
}
trafil1 = TopAbs::Compose(TopAbs::Reverse(Fi1.Transition()),trafil1);
}
-#ifdef DEB
+#ifdef CHFI3D_DEB
else cout<<"erreur"<<endl;
#endif
// eap, Apr 22 2002, occ 293
const TopoDS_Face& Favoid) const
{
if (P1.IsVertex() || P2.IsVertex()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"change of face on vertex"<<endl;
#endif
}
UIntPC1,UIntPC2,FaCo,SameSide,
IFaCo1,IFaCo2,Okvisavis,Vtx,Standard_True);
if (!Okvisavis) {
-#if DEB
+#if CHFI3D_DEB
cout<<"TwoCorner : pas de face commune"<<endl;
#endif
done=Standard_False;
}
if (!Okvisavis) {
-#if DEB
+#if CHFI3D_DEB
cout<<"TwoCorner : no common face"<<endl;
#endif
done=Standard_False;
return done;
}
if (!OkinterCC) {
-#if DEB
+#if CHFI3D_DEB
cout<<"biseau : failed intersection of tangency lines on common face"<<endl;
#endif
done=Standard_False;
ChFiDS_CommonPoint& CP2 = Fd2->ChangeVertex(isfirst2,IFaArc2);
if (!CP1.IsOnArc() || !CP2.IsOnArc()) {
-#if DEB
+#if CHFI3D_DEB
cout<<"fail 1 of 2 fillets are not on arc"<<endl;
#endif
done=Standard_False;
}
if ( ! CP1.Arc().IsSame( CP2.Arc()) ) {
// look like OnSame + OnDiff case (eap, Arp 9 2002, occ266)
-#if DEB
+#if CHFI3D_DEB
cout<<"PerformTwoCornerbyInter(): fillets are not on the same arc"<<endl;
#endif
done = Standard_True;
}
}
if(!ok1 || !ok2){
-#if DEB
+#if CHFI3D_DEB
cout<<"fail one of surfaces has no common base face with the pivot edge"<<endl;
#endif
done=Standard_False;
if (IFaCo1 == 1 &&
!ChFi3d_ComputeCurves(HS1,HS2,Pardeb,Parfin,Gc,
PGc1,PGc2,tolesp,tol2d,tolreached)) {
-#if DEB
+#if CHFI3D_DEB
cout<<"failed to calculate bevel error interSS"<<endl;
#endif
done=Standard_False;
else if (IFaCo1 == 2 &&
!ChFi3d_ComputeCurves(HS1,HS2,Parfin,Pardeb,Gc,
PGc1,PGc2,tolesp,tol2d,tolreached)) {
-#if DEB
+#if CHFI3D_DEB
cout<<"failed to calculate bevel error interSS"<<endl;
#endif
done=Standard_False;
Reduce(UIntPCSma,UIntPCBig,Hctg);
}
if(!ChFi3d_IntCS(BigHS,Hctg,UVi,wi)){
-#if DEB
+#if CHFI3D_DEB
cout<<"bevel : failed inter C S"<<endl;
#endif
done=Standard_False;
Standard_Real tolreached;
if (!ChFi3d_ComputeCurves(SmaHS,BigHS,Pardeb,Parfin,Gc,
PGc1,PGc2,tolesp,tol2d,tolreached)) {
-#if DEB
+#if CHFI3D_DEB
cout<<"failed to calculate bevel failed interSS"<<endl;
#endif
done=Standard_False;
Adaptor3d_CurveOnSurface consf(c2df,HF);
Handle(Adaptor3d_HCurveOnSurface) Hconsf = new Adaptor3d_HCurveOnSurface(consf);
if(!ChFi3d_IntCS(BigHS,Hconsf,UVi,wi)) {
-#if DEB
+#if CHFI3D_DEB
cout<<"bevel : failed inter C S"<<endl;
#endif
done=Standard_False;
if (!ChFi3d_ComputeCurves(HF,BigHS,Pardeb,Parfin,Gc,
PGc1,PGc2,tolesp,tol2d,tolreached)) {
-#if DEB
+#if CHFI3D_DEB
cout<<"fail calculation bevel fail interSS"<<endl;
#endif
done=Standard_False;
FairCurve_AnalysisCode Iana;
Standard_Boolean Ok;
Ok = Bat.Compute(Iana,25,1.e-2);
-#if DEB
+#if CHFI3D_DEB
if (!Ok) {
cout<<"no batten :";
Bat.Dump(cout);
isOnSameDiff = isOnSame && isOnDiff;
}
if ( isOnSameDiff ) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout << "OnSame + OnDiff, PerformMoreThreeCorner() calls PerformOneCorner()" << endl;
#endif
PerformOneCorner (Jndex, Standard_True);
Standard_Real tolc = CE.Resolution(tol);
found = ChFi3d_InterPlaneEdge(plan,HE,Nl,First,tolc);
gp_Pnt point = CE.Value(Nl);
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"******* ParamOnSpine() for edge "<<iedge<<endl;
cout<<Nl<<endl;
cout<<"point ped "<<point.X()<<" "<<point.Y()<<" "<<point.Z()<<endl;
#endif
if(found) Nl = Spine->Absc(Nl,ii);
point = Spine->Value(Nl);
-#ifdef DEB
+#ifdef CHFI3D_DEB
if (found) cout << "found by edge " << ii << " : ";
cout<<Nl<<endl;
cout<<"point psp "<<point.X()<<" "<<point.Y()<<" "<<point.Z()<<endl;
}
if (iSansFirst != 0) {
if (iSansLast == 0) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"Parsing : Pb of Hatcher"<<endl;
#endif
return 0;
if(!H1.IsDone(iH1)) return 0;
Nb1 = H1.NbDomains(iH1);
if(Nb1 == 0) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"SplitKPart : tangency line out of the face"<<endl;
#endif
return Standard_False;
if(!H2.IsDone(iH2)) return 0;
Nb2 = H2.NbDomains(iH2);
if(Nb2 == 0) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"SplitKPart : tangency line out of the face"<<endl;
#endif
return Standard_False;
// situation, eap occ354
if (C1.IsNull() && C2.IsNull()) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"SplitData : 2 zero lines hatching impossible"<<endl;
#endif
return Standard_False;
onS = 1;
else
onS = 2;
-#ifdef DEB
+#ifdef CHFI3D_DEB
if (threeE[0].IsSame(threeE[1]))
cout << "SplitKPart(), wrong corner vertex at switcher search" << endl;
#endif
onS = 1;
else
onS = 2;
-#ifdef DEB
+#ifdef CHFI3D_DEB
if (threeE[0].IsSame(threeE[1]))
cout << "SplitKPart(), wrong corner vertex at switcher search" << endl;
#endif
if (inter.IsDone()) {
Standard_Integer nbl = inter.NbLines();
if (nbl > 1) {
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"trop d'intersection entre les surfaces"<<endl;
#endif
}
}
}
else {
-# if DEB
+# if CHFI3D_DEB
cout << "Failed calculation of the minimum length" << endl;
# endif
}
// 3 concavities identic.
pivot = SearchPivot(sens,p,tol2d);
if(pivot < 0){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"pivot not found, plate is called"<<endl;
#endif
PerformMoreThreeCorner(Jndex, 3);
ifacdeb = CD[deb]->ChangeSetOfSurfData()->Value(i[deb][pivot])->Index(3-jf[deb][pivot]);
ifacfin = CD[fin]->ChangeSetOfSurfData()->Value(i[fin][pivot])->Index(3-jf[fin][pivot]);
if(ifacfin != ifacdeb){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"several base faces, plate is called"<<endl;
#endif
PerformMoreThreeCorner(Jndex, 3);
return;
}
if(i[pivot][deb] != i[pivot][fin]){
-#ifdef DEB
+#ifdef CHFI3D_DEB
cout<<"load surfdata on the pivot, plate is called"<<endl;
#endif
PerformMoreThreeCorner(Jndex, 3);
void ChFiDS_Spine::SetFirstParameter(const Standard_Real Par)
{
-#ifdef DEB
+#ifdef CHFIDS_DEB
if(Par >= Precision::Confusion())
cout<<"Interior extension at the start of guideline"<<endl;
if(IsPeriodic())
void ChFiDS_Spine::SetLastParameter(const Standard_Real Par)
{
-#ifdef DEB
+#ifdef CHFIDS_DEB
Standard_Real lll = abscissa->Value(abscissa->Upper());
if((Par - lll) <= -Precision::Confusion())
cout<<"Interior extension at the end of guideline"<<endl;
{
if(IsPeriodic()) Standard_Failure::Raise
("No extension by tangent on periodic contours");
-#ifdef DEB
+#ifdef CHFIDS_DEB
if(W >= Precision::Confusion())
cout<<"Interior extension at start of the guideline"<<endl;
#endif
if(IsPeriodic()) Standard_Failure::Raise
("No extension by tangent periodic contours");
-#ifdef DEB
+#ifdef CHFIDS_DEB
Standard_Real L = W - abscissa->Value(abscissa->Upper());
if(L <= -Precision::Confusion())
cout<<"Interior extension at the end of guideline"<<endl;
void ChFiDS_Spine::Load()
{
if(!abscissa.IsNull()){
-#ifdef DEB
+#ifdef CHFIDS_DEB
cout<<"new load of CE"<<endl;
#endif
}
ChamfRad = Spine.Radius() - Dis;
if ( Abs(ChamfRad) < Precision::Confusion() ) pointu = Standard_True;
if( ChamfRad < 0 ) {
-#ifdef DEB
+#ifdef CHFIKPART_DEB
cout<<"the chamfer can't pass"<<endl;
#endif
return Standard_False;
if (ouvert) {
if (Abs(angCon) - Abs(SemiAngl) > -Precision::Confusion() ) {
+#ifdef CHFIKPART_DEB
cout<<"wrong choice of angle for the chamfer"<<endl;
+#endif
return Standard_False;
}
}
SemiAngl = Abs(angCon) + Angle;
if ( (M_PI / 2. - SemiAngl) < Precision::Confusion() ) {
+#ifdef CHFIKPART_DEB
cout <<"wrong choice of angle for the chamfer"<<endl;
+#endif
return Standard_False;
}
Dis1 = move * Tan(SemiAngl) - Dis * Abs(Sin(angCon));
if ( Abs(ChamfRad) < Precision::Confusion() ) pointu = Standard_True;
if( ChamfRad < 0 ) {
-#ifdef DEB
+#ifdef CHFIKPART_DEB
cout<<"the chamfer can't pass"<<endl;
#endif
return Standard_False;
Rad = Cyl.Radius() - dis1;
if ( Abs(Rad) <= Precision::Confusion() ) pointu = Standard_True;
if(Rad < 0 ) {
+#ifdef CHFIKPART_DEB
cout<<"the chamfer can't pass"<<endl;
+#endif
return Standard_False;
}
}
dis2 = temp2 + temp1 * (cosAhOC - temp1);
if (dis2 < -1.E-09) {
+#ifdef CHFIKPART_DEB
cout<<"too great angle of chamfer"<<endl;
+#endif
return Standard_False;
}
else if (dis2 < 1.E-09) {
Rad = Cyl.Radius()- Dis1;
if ( Abs(Rad) <= Precision::Confusion() ) pointu = Standard_True;
if(Rad < 0 ) {
+#ifdef CHFIKPART_DEB
cout<<"the chamfer can't pass"<<endl;
+#endif
return Standard_False;
}
}
Rad = Maxrad - Rabio;
if(Abs(Rad) <= Precision::Confusion()){ c1sphere = Standard_True; }
else if(Rad < 0){
+#ifdef CHFIKPART_DEB
cout<<"the fillet does not pass"<<endl;
+#endif
return Standard_False;
}
}
ROff-=Radius;
}
else {
-#ifdef DEB
+#ifdef CHFIKPART_DEB
cout<<"the fillet does not pass"<<endl;
#endif
return Standard_False;
Rad = cylrad - Radius;
if(Abs(Rad) <= Precision::Confusion()){ c1sphere = Standard_True; }
else if(Rad < 0){
-#ifdef DEB
+#ifdef CHFIKPART_DEB
cout<<"the fillet can't pass"<<endl;
#endif
return Standard_False;
pp.Z()-delta*di.Z());
dz = gp_Dir(gp_Vec(p1,cen));
if(Abs(ds1.Dot(dz)-1.)>ptol){
-#ifdef DEB
+#ifdef CHFIKPART_DEB
cout<<"center of the spherical corner not found"<<endl;
#endif
return Standard_False;
if (n == 1) {
disptriangles = !disptriangles;
-#ifdef DEB
+#ifdef DBREP_DEB
if (disptriangles) cout <<"Triangulations are always displayed"<<endl;
else cout <<"Triangulations are displayed only if there is no geometric representation"<<endl;
#endif
if (n == 1) {
disppolygons = !disppolygons;
-#ifdef DEB
+#ifdef DBREP_DEB
if (disppolygons) cout <<"Polygons are always displayed"<<endl;
else cout <<"Polygons are displayed only if there is no geometric representation"<<endl;
#endif
if (PCurve.IsNull())
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder : PCurve is null\n";
#endif
return;
}
else if (U1 == U2)
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder PCurve : U1==U2\n";
#endif
return;
U2 - TrimPCurve->BasisCurve()->LastParameter() > Precision::PConfusion())
{
AddElement (PCurve, TopologicalEdge.Orientation());
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder TrimPCurve : parameters out of range\n";
cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter()
<< "), U2(" << U2 << "), Umax(" << PCurve->LastParameter() << ")\n";
{
if (PCurve->FirstParameter() - U1 > Precision::PConfusion())
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
cout << " U1(" << U1 << "), Umin(" << PCurve->FirstParameter() << ")\n";
#endif
}
if (PCurve->FirstParameter() - U2 > Precision::PConfusion())
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
cout << " U2(" << U2 << "), Umin(" << PCurve->FirstParameter() << ")\n";
#endif
}
if (U1 - PCurve->LastParameter() > Precision::PConfusion())
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
cout << " U1(" << U1 << "), Umax(" << PCurve->LastParameter() << ")\n";
#endif
}
if (U2 - PCurve->LastParameter() > Precision::PConfusion())
{
-#ifdef DEB
+#ifdef DBREP_DEB
cout << "DBRep_IsoBuilder PCurve : parameters out of range\n";
cout << " U2(" << U2 << "), Umax(" << PCurve->LastParameter() << ")\n";
#endif
aTclScript.AssignCat ( "/dftree.tcl" );
OSD_File aTclScriptFile (aTclScript);
if (aTclScriptFile.Exists()) {
-#ifdef DEB
+#ifdef DDF_DEB
cout << "Load " << aTclScript << endl;
#endif
di.EvalFile( aTclScript.ToCString() );
ReadChar(l,len);
if (strncmp(DDF_IOStream::MagicNumber(),l.ToCString(),len) != 0) {
-#ifdef DEB
+#ifdef DDF_DEB
cout<<"BeginReadInfoSection: format error"<<endl;
#endif
s = Storage_VSFormatError;
f.Close();
if (strncmp(DDF_IOStream::MagicNumber(),l.ToCString(),len) != 0) {
-#ifdef DEB
+#ifdef DDF_DEB
cout<<"IsGoodFileType: format error"<<endl;
#endif
s = Storage_VSFormatError;
#endif
if (!anOS) {
// A problem with the stream
-#ifdef DEB
+#ifdef DDATASTD_DEB
cout << "Error: problem with the file stream, rdstate = " <<anOS.rdstate() <<endl;
#endif
}
TDF_Label Label;
Standard_Boolean Found = DDF::AddLabel (DF, LabelName, Label);
if (!Found) {
+#ifdef DNAMING_DEB
cout <<"no labels"<<endl;
+#endif
return S;
}
if (Found) {
Label.FindAttribute(TNaming_NamedShape::GetID(),NS);
S = TNaming_Tool::CurrentShape(NS);
if (S.IsNull())
+#ifdef DNAMING_DEB
cout <<"current shape from "<< LabelName <<" is deleted"<<endl;
+#endif
return S;
}
return S;
Handle(TNaming_NamedShape) DNaming::GetObjectValue(const Handle(TDataStd_UAttribute)& theObject)
{
Handle(TNaming_NamedShape) aNS;
-#ifdef DEB
-// cout <<"DNaming::GetObjectValue : Obj is NULL = " << theObject.IsNull() <<endl;
-// cout << "Object = " << theObject->DynamicType()->Name() <<endl;
-// Standard_CString aStrGUID = "00000000-0000-0000-0000-000000000000";
-// Standard_GUID aGd = theObject->ID();
-// aGd.ShallowDump(cout);
-#endif
+
if(!theObject.IsNull() && theObject->ID() == GEOMOBJECT_GUID) {
Handle(TDF_Reference) aReference;
Handle(TNaming_NamedShape) anObjectNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), anObjectNS);
if (anObjectNS.IsNull() || anObjectNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"BooleanOperationDriver:: Object is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
Handle(TNaming_NamedShape) aToolNS = DNaming::GetObjectValue(aToolObj);
if (aToolNS.IsNull() || aToolNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"BooleanOperationDriver:: Tool is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
TopoDS_Shape aTOOL = aToolNS->Get();
TopoDS_Shape anOBJECT = anObjectNS->Get();
if (aTOOL.IsNull() || anOBJECT.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"BooleanOperationDriver:: Tool is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
const TopoDS_Shape& ObjSh = MS.Shape1();
const TopoDS_Shape& ToolSh = MS.Shape2();
if (ResSh.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"LoadFuseNamingDS: The result of the boolean operation is null"<<endl;
#endif
return;
const TopoDS_Shape& ObjSh = MS.Shape1();
const TopoDS_Shape& ToolSh = MS.Shape2();
if (ResSh.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"LoadSectionNamingDS: The result of the boolean operation is null"<<endl;
#endif
return;
Handle(TDataStd_UAttribute) anObject = DNaming::GetObjectArg(aFunction,CYL_AXIS);
Handle(TNaming_NamedShape) aNSAxis = DNaming::GetObjectValue(anObject);
if (aNSAxis->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"CylinderDriver:: Axis is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
}
TopoDS_Shape aTopoDSAxis = aNSAxis->Get();
if (aTopoDSAxis.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"CylinderDriver:: Axis is null"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
}
// Creation of gp axis (gp_Ax2):
if (aTopoDSAxis.ShapeType() != TopAbs_EDGE && aTopoDSAxis.ShapeType() != TopAbs_WIRE) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"CylinderDriver:: Wrong axis, ShapeType = " << aTopoDSAxis.ShapeType() <<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
anAxis.SetLocation(aP1);
}
} else {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"CylinderDriver:: I don't support wires for a while"<<endl;
#endif
aFunction->SetFailure(WRONG_AXIS);
Handle(TNaming_NamedShape) aContextNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"FilletDriver:: Context is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
if(aRadius < Precision::Confusion()) {
aFunction->SetFailure(WRONG_ARGUMENT);
-#ifdef DEB
+#ifdef DNAMING_DEB
cout << "FilletDriver:: Radius < Precision::Confusion" << endl;
#endif
return -1;
Handle(TDataStd_UAttribute) aPathObj = DNaming::GetObjectArg(aFunction,FILLET_PATH);
Handle(TNaming_NamedShape) aPathNS = DNaming::GetObjectValue(aPathObj);
if (aPathNS.IsNull() || aPathNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"FilletDriver:: Path is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
TopoDS_Shape aPATH = aPathNS->Get();
TopoDS_Shape aCONTEXT = aContextNS->Get();
if (aPATH.IsNull() || aCONTEXT.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"FilletDriver:: Path or Context is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
Standard_GUID drvGUID;
if(!GetFuncGUID(theArg[i],drvGUID)) continue;
aFunctionDrvTable->AddDriver(drvGUID, GetDriver(theArg[i]));
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "DNaming_AddDriver : " << theArg[i] << " driver is added" <<endl;
#endif
}
return 0;
}
+#ifdef DNAMING_DEB
cout << "DNaming_AddDriver : Error" << endl;
+#endif
return 1;
}
goto ERR;
TCollection_AsciiString entry;
TDF_Tool::Entry(FatherLab, entry);
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "DNaming_SolveFlatFrom: Father label = " << entry << endl;
#endif
Standard_Boolean found(Standard_False);
cout << "DNaming_SolveFlatFrom: Driver failed at label = " << entry << endl;
return 1;
}
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout <<"DNaming_SolveFlatFrom : function from label " << entry << " is recomputed" << endl;
#endif
} catch (EXCEPTION) {
Standard_CString aDocS(theArg[1]);
if (!DDocStd::GetDocument(aDocS, aDoc)) return 1;
if(GetLogBook().IsEmpty()) {
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "DNaming_InitLogBook : is empty" <<endl;
#endif
}
else {
GetLogBook().Clear();
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "DNaming_InitLogBook : cleaned" <<endl;
#endif
}
cout << "DNaming_ComputeFun : No Driver or Driver failed" << endl;
return 1;
}
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout <<"DNaming_ComputeFun : function from label " << theArg[2] << " is recomputed" << endl;
#endif
return 0;
if (nb == 7)
aGeometry = (Standard_Boolean) Draw::Atoi(a[6]);
Handle(TNaming_NamedShape) aCont = DNaming::GetObjectValue(aContext);
-#ifdef DEBUG
+#ifdef DNAMING_DEB
if(aCont.IsNull() || aCont->IsEmpty())
cout <<"Wrong Context ..." <<endl;
#endif
}
if(!aCont.IsNull()) {
-#ifdef DEBUG
+#ifdef DNAMING_DEB
TCollection_AsciiString entry;
TDF_Tool::Entry(aCont->Label(), entry);
cout << "ContextNS Label = " << entry <<endl;
const char** a)
{
if (nb > 3) {
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "NB = " << nb <<endl;
#endif
Handle(TDocStd_Document) aDocument;
const char** a)
{
if (nb > 4) {
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "NB = " << nb <<endl;
#endif
Handle(TDocStd_Document) aDocument;
isFirst = Standard_False;
TCollection_AsciiString entry;
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
-#ifdef DEBUG
+#ifdef DNAMING_DEB
cout << "First Selection function at " << entry <<endl;
#endif
}
if(isFirst) {
FirstAuxObj = auxObj;
isFirst = Standard_False;
-#ifdef DEBUG
+#ifdef DNAMING_DEB
TCollection_AsciiString entry;
TDF_Tool::Entry(FirstAuxObj->Label(), entry);
cout << "First Selection function at " << entry <<endl;
Handle(TDataStd_UAttribute) aRefPnt = DNaming::GetObjectArg(aFunction,PNTRLT_REF);
Handle(TNaming_NamedShape) aRefPntNS = DNaming::GetObjectValue(aRefPnt);
if (aRefPntNS.IsNull() || aRefPntNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"PointDriver:: Ref Point is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
Handle(TDataStd_UAttribute) anObject = DNaming::GetObjectArg(aFunction,SPHERE_CENTER);
Handle(TNaming_NamedShape) aNSCnt = DNaming::GetObjectValue(anObject);
if (aNSCnt.IsNull() || aNSCnt->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"SphereDriver:: Center point is null or empty"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
TopoDS_Shape aCntShape = aNSCnt->Get();
if(aCntShape.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"SphereDriver:: Center point is null"<<endl;
#endif
aFunction->SetFailure(WRONG_ARGUMENT);
Handle(TNaming_NamedShape) aContextNS;
aLab.FindAttribute(TNaming_NamedShape::GetID(), aContextNS);
if (aContextNS.IsNull() || aContextNS->IsEmpty()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"TransformationDriver:: Context is empty"<<endl;
#endif
aFunction->SetFailure(WRONG_CONTEXT);
return;
const TopoDS_Shape& aSrcShape = theSourceNS->Get();
if (aSrcShape.IsNull()) {
-#ifdef DEB
+#ifdef DNAMING_DEB
cout<<"DNaming_TransformationDriver::LoadNamingDS: The result of the Transform operation is null"<<endl;
#endif
return;
DDataStd::AllCommands(theDI);
DPrsStd::AllCommands(theDI);
DDocStd::AllCommands(theDI);
-#ifdef DEB
+#ifdef DPRSSTD_DEB
cout << "Draw Plugin : All DF commands are loaded" << endl;
#endif
}
if (!DDF::FindLabel(D->GetData(),arg[2],L)) return 1;
Standard_GUID guid;
TCollection_ExtendedString str = arg[3];
-#ifdef DEB
+#ifdef DPRSSTD_DEB
cout << "Inputed parameter > " << str << endl;
#endif
if ( str == "A" ) //axis
// guid = TSketchStd_Edge::GetID(); //"b3aac90a-5b78-11d1-8940-080009dc3333"
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, guid);
-#ifdef DEB
+#ifdef DPRSSTD_DEB
cout << "Driver GUID = ";
prs->GetDriverGUID().ShallowDump(cout);
cout << "\n";
}
else {
TCollection_ExtendedString str = arg[3];
-#ifdef DEB
+#ifdef DPRSSTD_DEB
cout << "Inputed parameter > " << str << endl;
#endif
if ( str == "A" ) //axis
GeomAPI_ProjectPointOnCurve Projector( vtori, Einf1.Geometry() ); //patch
pvt = Projector.NearestPoint();
-#ifdef DEB
+#ifdef DRAFT_DEB
static Standard_Integer VertexRecomp = 1;
if (VertexRecomp!=0) {
cout << "pori :" << vtori.X() << " " << vtori.Y() << " " << vtori.Z() << endl;
gp_Pnt opvt;
Einf2.Geometry()->D0(Vinf.Parameter(Edg2), opvt);
-#ifdef DEB
+#ifdef DRAFT_DEB
if (VertexRecomp!=0) {
cout << " Edg 2 :" << Vinf.Parameter(Vinf.Edge()) << endl;
cout << "opvt " << opvt.X() << " " << opvt.Y() << " " << opvt.Z() << endl;
else if (TypeS == STANDARD_TYPE(Geom_CylindricalSurface)) {
Standard_Real testdir = Direction.Dot(NeutralPlane.Axis().Direction());
if (Abs(testdir) <= 1.-Precision::Angular()) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCyl:Draft_Direction_and_Neutral_Perpendicular" << endl;
#endif
return NewS;
gp_Cylinder Cy = Handle(Geom_CylindricalSurface)::DownCast(S)->Cylinder();
testdir = Direction.Dot(Cy.Axis().Direction());
if (Abs(testdir) <= 1.-Precision::Angular()) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCyl:Draft_Direction_and_Cylinder_Perpendicular" << endl;
#endif
return NewS;
}
if (!isIntDone || i2s.TypeInter() != IntAna_Circle) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCyl:Draft_Intersection_Neutral_Cylinder_NotDone" << endl;
#endif
return NewS;
Standard_Real testdir = Direction.Dot(NeutralPlane.Axis().Direction());
if (Abs(testdir) <= 1.-Precision::Angular()) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCone:Draft_Direction_and_Neutral_Perpendicular" << endl;
#endif
return NewS;
testdir = Direction.Dot(Co1.Axis().Direction());
if (Abs(testdir) <= 1.-Precision::Angular()) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCone:Draft_Direction_and_Cone_Perpendicular" << endl;
#endif
return NewS;
IntAna_QuadQuadGeo i2s;
i2s.Perform(NeutralPlane,Co1,Precision::Angular(),Precision::Confusion());
if (!i2s.IsDone() || i2s.TypeInter() != IntAna_Circle) {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurfaceCone:Draft_Intersection_Neutral_Conical_NotDone" << endl;
#endif
return NewS;
}
}
else {
-#ifdef DEB
+#ifdef DRAFT_DEB
cout << "NewSurface:Draft_SurfNotYetImplemented" << endl;
#endif
}
aMsg << aPluginResource->Value(theKey.ToCString());
aMsg << "; reason: ";
aMsg << error.ToCString();
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "could not open: " << aPluginResource->Value(theKey.ToCString())<< " ; reason: "<< error.ToCString() << endl;
#endif
Draw_Failure::Raise(aMsg);
Tcl_Exit(0);
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef DRAW_DEB
cout <<"Tcl_Exit have an exeption" << endl;
#endif
}
// check if the file name has been specified and use default value if not
if (thePluginName.IsEmpty()) {
thePluginName += "DrawPlugin";
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Plugin file name has not been specified. Defaults to " << thePluginName.ToCString() << endl;
#endif
}
if (aToSetCSFVariable) {
OSD_Environment aCSFVarEnv ( aCSFVariable, aPluginDir );
aCSFVarEnv.Build();
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Variable " << aCSFVariable.ToCString() << " has not been explicitly defined. Set to " << aPluginDir.ToCString() << endl;
#endif
if ( aCSFVarEnv.Failed() ) {
const TCollection_AsciiString& aKey = theMap.FindKey(j);
TCollection_AsciiString aResource = aKey;
if(myResources->Find(aResource.ToCString())) {
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Parse Value ==> " << myResources->Value(aResource.ToCString()) << endl;
#endif
TCollection_AsciiString aValue(myResources->Value(aResource.ToCString()));
Standard_Integer i=1;
for(;;) {
TCollection_AsciiString aCurKey = aValue.Token(" \t,", i++);
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Parse aCurKey = " << aCurKey.ToCString() << endl;
#endif
if(aCurKey.IsEmpty()) break;
for(j = 1; j <= aMapExtent; j++) {
const TCollection_AsciiString& aKey = aMap.FindKey(j);
TCollection_AsciiString aResource = aKey;
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "aResource = " << aResource << endl;
#endif
if(myResources->Find(aResource.ToCString())) {
const TCollection_AsciiString& aValue = myResources->Value(aResource.ToCString());
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Value ==> " << aValue << endl;
#endif
OSD_File aTclScriptFile ( aTclScriptFileName );
OSD_File aTclScriptFileDefaults ( aTclScriptFileNameDefaults );
if (!aTclScriptDir.IsEmpty() && aTclScriptFile.Exists()) {
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Load " << aTclScriptFileName << " TclScript" << endl;
#endif
di.EvalFile( aTclScriptFileName.ToCString() );
} else if (!aPluginDir.IsEmpty() && aTclScriptFileDefaults.Exists()) {
-#ifdef DEB
+#ifdef DRAW_DEB
cout << "Load " << aTclScriptFileNameDefaults << " TclScript" << endl;
#endif
di.EvalFile( aTclScriptFileNameDefaults.ToCString() );
return;
}
}
+#ifdef DRAWDIM_DEB
cout << " DrawDim_PlanarDiameter::DrawOn : dimension error" << endl;
+#endif
}
}
}
}
+#ifdef DRAWDIM_DEB
cout << " DrawDim_PlanarDistance::DrawOn : dimension error" << endl;
+#endif
}
return;
}
}
+#ifdef DRAWDIM_DEB
cout << " DrawDim_PlanarRadius::DrawOn : dimension error" << endl;
+#endif
}
//void AIS_RadiusDimension::ComputeOneFaceRadius(const Handle(Prs3d_Presentation)& aPresentation)
//{
-
+#ifdef DRAWDIM_DEB
cout << "entree dans computeonefaceradius"<< endl;
+#endif
BRepAdaptor_Surface surfAlgo (TopoDS::Face(myFShape));
Standard_Real uFirst, uLast, vFirst, vLast;
uFirst = surfAlgo.FirstUParameter();
{
IsSolved = H->Decompose();
-#if DEB
+#if FEMTOOL_DEB
if (!IsSolved) {
cout << "Solve Echec H = " << endl;
H->OutM();
realbuffer[0] = '\0';
if (!(myStream >> realbuffer)) {
+#ifdef FSD_DEB
cerr << "%%%ERROR: read error of double at offset " << myStream.tellg() << endl;
cerr << "\t buffer is" << realbuffer<< endl;
+#endif
Storage_StreamTypeMismatchError::Raise();
}
if (!OSD::CStringToReal(realbuffer,aValue)) {
+#ifdef FSD_DEB
cerr << "%%%ERROR: read error of double at offset " << myStream.tellg() << endl;
cerr << "\t buffer is" << realbuffer<< endl;
+#endif
Storage_StreamTypeMismatchError::Raise();
}
myPointSize = thePointSize;
if (!myFTLib->IsValid())
{
- std::cerr << "FreeType library is unavailable!\n";
+ //std::cerr << "FreeType library is unavailable!\n";
Release();
return false;
}
if(scal1 > tolang) {
Standard_Real killfactor = tolang/scal1;
stat[i].DoKill(killfactor);
-#ifdef DEB
+#ifdef GEOMFILL_DEB
cout<<"pb coons cnd coin : "<<i<<" fact = "<<killfactor<<endl;
#endif
}
}
nbd3 += ctr[ii];
}
-#ifdef DEB
+#ifdef GEOMFILL_DEB
appclock.Start();
#endif
if(nbd3) PerformApprox();
-#ifdef DEB
+#ifdef GEOMFILL_DEB
appclock.Stop();
#endif
}
appdone = Standard_True;
-#ifdef DEB
+#ifdef GEOMFILL_DEB
cstclock.Start();
#endif
MatchKnots();
PerformS0();
PerformS1();
PerformSurface();
-#ifdef DEB
+#ifdef GEOMFILL_DEB
cstclock.Stop();
totclock.Stop();
Standard_Real tottime, apptime, partime, csttime;
if (Ok)
tol = (Tol-tol)/2;
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "smooth law echec" << endl;
#endif
return; // Echec
Ok = (tol <= Tol);
}
if (!Ok) {
-#if DEB
+#if GEOMFILL_DEB
cout << "smooth law echec" << endl;
#endif
}
NStatus,Normal,OrderU,OrderV);
if (NStatus != CSLib_Defined) {
-#if DEB
+#if GEOMFILL_DEB
cout << U << ", " << V<< endl;
for(i=0;i<=MaxOrder;i++)
for(j=0;j<=MaxOrder;j++){
mySnglLen->ChangeValue(i) = Min(Sqrt(2*NullTol/norm), MaxSingular);
else mySnglLen->ChangeValue(i) = MaxSingular;
}
-#if DEB
+#if GEOMFILL_DEB
for(i = 1; i <= mySngl->Length(); i++) {
cout<<"Sngl("<<i<<") = "<<mySngl->Value(i)<<" Length = "<<mySnglLen->Value(i)<<endl;
}
mySnglLen->ChangeValue(i) = tmpSeq(i).Y();
}
}
-#if DEB
+#if GEOMFILL_DEB
cout<<"After merging"<<endl;
for(i = 1; i <= mySngl->Length(); i++) {
cout<<"Sngl("<<i<<") = "<<mySngl->Value(i)<<" Length = "<<mySnglLen->Value(i)<<endl;
if(RotateTrihedron(Tangent,Normal,BiNormal,aTn) == Standard_False)
{
-#ifdef DEB
+#ifdef GEOMFILL_DEB
cout << "Cannot coincide two tangents." << endl;
#endif
return Standard_False;
Standard_Real Norm = n.Magnitude();
if (Norm < 1.e-12) {
Norm = 1;
-#if DEB
+#if GEOMFILL_DEB
cout << "GuideTrihedronAC : Normal indefinie" << endl;
#endif
}
#include <DrawTrSurf.hxx>
#endif
-#if DEB
+#if GEOMFILL_DEB
static void TracePlan(const Handle(Geom_Surface)& /*Plan*/)
{
cout << "Pas d'intersection Guide/Plan" << endl;
Int.Perform(myTrimG, Pl); // intersection plan / guide
if (Int.NbPoints() == 0) {
-#if DEB
+#if GEOMFILL_DEB
TracePlan(Plan);
#endif
w = (fabs(myGuide->LastParameter() -w) > fabs(myGuide->FirstParameter()-w) ? myGuide->FirstParameter() : myGuide->LastParameter());
}
}
-#if DEB
+#if GEOMFILL_DEB
if (Abs(Diff) > DeltaG) {
cout << "Trihedron Plan Diff on Guide : " <<
Diff << endl;
BiNormal.Normalized();
}
else { // Erreur...
-#if DEB
+#if GEOMFILL_DEB
cout << "D0 :";
// plan ortho a la trajectoire pour determiner Pprime
Handle(Geom_Plane) Plan = new (Geom_Plane)(P, Tangent);
DTangent.Crossed(Normal));
}
else {// Erreur...
-#if DEB
+#if GEOMFILL_DEB
cout << "D1 :";
// plan ortho a la trajectoire
Handle(Geom_Plane) Plan = new (Geom_Plane)(P, Tangent);
//function : TraceRevol
//purpose : Trace la surface de revolution (Debug)
//=======================================================================
-#if DEB
+#if GEOMFILL_DEB
static void TraceRevol(const Standard_Real t,
const Standard_Real s,
const Handle(GeomFill_TrihedronWithGuide)& Law,
Standard_Real theU = 0., theV = 0.;
if (!DistMini.IsDone() || DistMini.NbExt() == 0) {
-#if DEB
+#if GEOMFILL_DEB
cout <<"LocationGuide : Pas d'intersection"<<endl;
TraceRevol(t, U, myLaw, mySec, myCurve, Trans);
#endif
if (Result.IsDone() &&
(Result.FunctionSetErrors().Norm() < TolRes(1)*TolRes(1)) ) {
-#if DEB
+#if GEOMFILL_DEB
cout << "Ratrappage Reussi !" << endl;
#endif
SOS = Standard_True;
theV = PInt.V();
}
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "Echec du Ratrappage !" << endl;
#endif
}
}
}
-#if DEB
+#if GEOMFILL_DEB
if (Abs(Diff) > DeltaG) {
cout << "Location :: Diff on Guide : " <<
Diff << endl;
InGoodPeriod (OldAngle, 2*M_PI, Angle);
Diff = Angle - OldAngle;
}
-#if DEB
+#if GEOMFILL_DEB
if (Abs(Diff) > M_PI/4) {
cout << "Diff d'angle trop grand !!" << endl;
}
InGoodPeriod (myPoles2d->Value(2, ii-1).Y(), UPeriod, v);
}
Diff = v - myPoles2d->Value(2, ii-1).Y();
-#if DEB
+#if GEOMFILL_DEB
if (Abs(Diff) > (Ul-Uf)/(2+NbKnots)) {
cout << "Diff sur section trop grand !!" << endl;
}
M.SetCols(n, b, t);
}
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "LocationGuide::D0 : No Result !"<<endl;
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
#endif
M.SetCols(n, b, t);
}
else {
-#if DEB
+#if GEOMFILL_DEB
Standard_Real U = myFirstS + ratio*(Param-myCurve->FirstParameter());
cout << "LocationGuide::D0 : No Result !"<<endl;
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
Ga.Solve (DEDT.Opposite(), DSDT);// resolution du syst.
}//if
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "DEDX = " << DEDX << endl;
cout << "DEDT = " << DEDT << endl;
#endif
}//if_Result
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "LocationGuide::D1 : No Result !!"<<endl;
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
#endif
}//if_result
else {
-#if DEB
+#if GEOMFILL_DEB
cout << "LocationGuide::D2 : No Result !!" <<endl;
TraceRevol(Param, U, myLaw, mySec, myCurve, Trans);
#endif
#include <gp_Lin.hxx>
#include <gp_Circ.hxx>
-#ifdef DEB
+#ifdef GEOMFILL_DEB
# ifdef DRAW
# include <DrawTrSurf.hxx>
# endif
static Standard_Integer NbSurf = 0;
#endif
-#ifdef DEB
+#ifdef GEOMFILL_DEB
// verification des fonctions de derivation D1 et D2 par differences finies
Standard_Boolean verifD1(const TColgp_Array1OfPnt& P1,
const TColStd_Array1OfReal& W1,
if (NullWeight) return Standard_False;
// verif par diff finies sous debug sauf pour les surfaces periodiques
-#ifdef DEB
+#ifdef GEOMFILL_DEB
if (!mySurface->IsVPeriodic()) {
Standard_Real pas = 1.e-6, wTol = 1.e-4, pTol = 1.e-3;
Standard_Real V1,V2;
if (NullWeight) return Standard_False;
// verif par diff finies sous debug sauf pour les surfaces periodiques
-#ifdef DEB
+#ifdef GEOMFILL_DEB
if (!mySurface->IsVPeriodic()) {
Standard_Real V1,V2;
Standard_Boolean ok1,ok2;
if (mySurface->VDegree()<2) {
mySurface->IncreaseDegree(mySurface->UDegree(),2);
}
-#ifdef DEB
+#ifdef GEOMFILL_DEB
NbSurf++;
if (Affich) {
#ifdef DRAW
}
case GeomFill_IsDarboux :
-#if DEB
+#if GEOMFILL_DEB
{
cout << "Option Darboux: non realisable" << endl;
}
myAdpPath->LastParameter(),
Tol, Tol, 0., 0.01,
TheConti, DegMax, NbMaxSegment);
-#if DEB
+#if GEOMFILL_DEB
cout << "Tuyau : ";
App.Dump(cout);
cout << endl;
}
}
*/
-#if DEB
+#if GEOMFILL_DEB
if (Intersector.NbPoints() == 0) {
Intersector.Dump();
}
if (Approx.IsDone()) {
Ok = Standard_True;
-#if DEB
+#if GEOMFILL_DEB
Approx.Dump(cout);
#endif
Segmax,
eval,
Preferentiel);
-#if DEB
+#if GEOMFILL_DEB
Approx.Dump(cout);
#endif
mySurface = new (Geom_RectangularTrimmedSurface)
(S,UFirst, ULast, Standard_True);
-#if DEB
+#if GEOMFILL_DEB
if (isUPeriodic && !mySurface->IsUPeriodic())
cout<<"Pb de periodicite en U" << endl;
if (isUPeriodic && !mySurface->IsUClosed())
}
else
if (D1Ref.IsOpposite(D1, Precision::Angular()))
+#ifdef GEOMFILL_DEB
cout <<"Que fais-je ???? " << endl;
+#endif
// TR is the transformation between (i-1) section and the i-th.
TR = Rot * Trans;
}
if (NullWeight) {
-#if DEB
+#if GEOMLIB_DEB
cout << "Echec de l'Extension rationnelle" << endl;
#endif
lambmin /= 3.;
math_Jacobi J(M);
if (!J.IsDone()) {
-#if DEB
+#if GEOMLIB_DEB
cout << "Erreur dans Jacobbi" << endl;
M.Dump(cout);
#endif
}
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef GEOMTOIGES_DEB
cout << "Warning: GeomToIGES_GeomCurve: can't trim bspline" << endl;
cout << "Warning: Exception in Segment(): " ;
Standard_Failure::Caught()->Print(cout);
return res;
}
catch(Standard_Failure){
-#ifdef DEB
+#ifdef GEOMTOIGES_DEB
cout << "writing non-planar offset curve."<<endl;
cout << "Warning: GeomConvert::CurveToBSplineCurve raised an exception: ";
Standard_Failure::Caught()->Print(cout);
}
}
else {
-#ifdef DEB
+#ifdef GEOMTOSTEP_DEB
cout<<"MakeBoundedCurve, type : "<<C->DynamicType()->Name()<<" not processed"<<endl;
#endif
done = Standard_False;
theConic = MkParabola.Value();
}
else {
-#ifdef DEBUG
+#ifdef GEOMTOSTEP_DEB
cout << "3D Curve Type : " << C->DynamicType() << endl;
#endif
done = Standard_False;
else {
// Attention : Other 2d conics shall be implemented ...
// To be performed later !
-#ifdef DEBUG
+#ifdef GEOMTOSTEP_DEB
cout << "2D conic not yet implemented" << endl;
#endif
done = Standard_False;
B = BZ;
}
else {
-#ifdef DEB
+#ifdef GEOMTOSTEP_DEB
cout<<"GeomToStep_MakeCurve, TrimmedCurve, BasisCurve is transferred not trimmed"<<endl;
cout<<"BasisCurve Type : "<<B->DynamicType()->Name()<<endl;
#endif
Handle(Geom2d_Circle) theC2d = Handle(Geom2d_Circle)::DownCast(C);
gp_Circ2d C2d = theC2d->Circ2d();
if (!C2d.IsDirect()) {
-#ifdef DEB
+#ifdef GEOMTOSTEP_DEB
cout << "Warning : Circle converted to BSpline." << endl;
#endif
Handle(Geom2d_BSplineCurve) aBSplineCurve2d =
Handle(Geom2d_Ellipse) theE2d = Handle(Geom2d_Ellipse)::DownCast(C);
gp_Elips2d E2d = theE2d->Elips2d();
if (!E2d.IsDirect()) {
-#ifdef DEB
+#ifdef GEOMTOSTEP_DEB
cout << "Warning : Ellipse converted to BSpline." << endl;
#endif
Handle(Geom2d_BSplineCurve) aBSplineCurve2d =
}
else {
done = Standard_False;
-#ifdef DEB
+#ifdef GEOMTOSTEP_DEB
cout << " unknown type " << S->DynamicType()->Name() << endl;
#endif
}
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef GEOMTOOLS_DEB
Handle(Standard_Failure) anExc = Standard_Failure::Caught();
cout <<"EXCEPTION in GeomTools_Curve2dSet::ReadCurve2d(..)!!!" << endl;
cout << anExc << endl;
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef GEOMTOOLS_DEB
Handle(Standard_Failure) anExc = Standard_Failure::Caught();
cout <<"EXCEPTION in GeomTools_CurveSet::ReadCurve(..)!!!" << endl;
cout << anExc << endl;
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef GEOMTOOLS_DEB
Handle(Standard_Failure) anExc = Standard_Failure::Caught();
cout <<"EXCEPTION in GeomTools_SurfaceSet::ReadSurface(..)!!!" << endl;
cout << anExc << endl;
{
if( n < 2)
{
+#ifdef GEOMLITETEST_DEB
cout<< "2dintersect curve curve [Tol]"<<endl;
+#endif
return 1;
}
Standard_Integer k = 1;
if (Tolerance>0) { Variation.SetWithMinMax(Standard_True);}
Variation.Approximate();
-# ifdef DEB
+# ifdef GEOMLITETEST_DEB
//Variation.Dump(cout);
Standard_SStream aSStream;
Variation.Dump(aSStream);
Variation.SetTolerance( Abs(Tolerance));
if (Tolerance>0) { Variation.SetWithMinMax(Standard_True);}
Variation.Approximate();
-# ifdef DEB
+# ifdef GEOMLITETEST_DEB
//Variation.Dump(cout);
Standard_SStream aSStream;
Variation.Dump(aSStream);
if (VarName.IsEmpty())
{
+#ifdef GRAPHIC3D_DEB
std::cerr << "Both environment variables CSF_MDTVTexturesDirectory and CASROOT are undefined!\n"
<< "At least one should be defined to use standard Textures.\n";
+#endif
Standard_Failure::Raise ("CSF_MDTVTexturesDirectory and CASROOT are undefined");
return VarName;
}
OSD_File aTextureFile (aTexture);
if (!aDir.Exists() || !aTextureFile.Exists())
{
+#ifdef GRAPHIC3D_DEB
std::cerr << " CSF_MDTVTexturesDirectory or CASROOT not correctly setted\n";
std::cerr << " not all files are found in : "<< VarName.ToCString() << std::endl;
+#endif
Standard_Failure::Raise ("CSF_MDTVTexturesDirectory or CASROOT not correctly setted");
return VarName;
}
}
//-- ============================================================
void SetDim(const Standard_Integer n) {
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout<<"\n@#@#@#@#@# SetDim "<<n<<endl;
#endif
if(UV)
}
else {
myNbPoints = myNbSegments = 0;
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::NextInterference : ";
if (myLE == myFE)
cout << "Edge " << myLE
else {
stbef = TopAbs_OUT;
staft = TopAbs_OUT;
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::EdgeState : undefined" << endl;
#endif
}
else {
stbef = TopAbs_OUT;
staft = TopAbs_OUT;
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::EdgeState : undefined" << endl;
#endif
}
else if (p > param + tolpar)
Loop = Standard_False;
else {
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::HidingStartLevel : ";
cout << "Bad Parameter." << endl;
#endif
//=======================================================================
-#ifdef DEB
Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer I, HLRBRep_FaceData& FD)
-#else
-Standard_Boolean HLRBRep_Data::OrientOutLine (const Standard_Integer, HLRBRep_FaceData& FD)
-#endif
{
+ (void)I; // avoid compiler warning
+
const Handle(HLRAlgo_WiresBlock)& wb = FD.Wires();
Standard_Integer nw = wb->NbWires();
Standard_Integer iw1,ie1,ne1;
(iFaceGeom,pu,pv,V);
gp_Vec Nm = mySLProps.Normal();
if (curv == 0) {
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::OrientOutLine " << I;
cout << " Edge " << myFE << " : ";
cout << "CurvatureValue == 0." << endl;
Nm.Transform(T);
Nm.Cross(Tg);
if (Tg.Magnitude() < gp::Resolution()) {
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::OrientOutLine " << I;
cout << " Edge " << myFE << " : ";
cout << "Tg.Magnitude() == 0." << endl;
eb1->Orientation(ie1,myFEOri);
}
else {
-#ifdef DEB
+#ifdef HLRBREP_DEB
cout << "HLRBRep_Data::OrientOutLine " << I;
cout << " Edge " << myFE << " : ";
cout << "UVPoint not found, OutLine not Oriented" << endl;
ZTI2 = Z2 = Nod12PntZ;
if (Nod12Edg1 == (Standard_Boolean) e) U2 = Nod12PCu1;
else if (Nod12Edg2 == (Standard_Boolean) e) U2 = Nod12PCu2;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
cout << "Parameter error on Node " << i1p2 << endl;
ZTI2 = Z2 = Nod12PntZ;
if (Nod12Edg1 == (Standard_Boolean) e) U2 = Nod12PCu1;
else if (Nod12Edg2 == (Standard_Boolean) e) U2 = Nod12PCu2;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
cout << "Parameter error on Node " << i1p2 << endl;
ZTI2 = Z2 = Nod12PntZ;
if (Nod12Edg1 == (Standard_Boolean) e) U2 = Nod12PCu1;
else if (Nod12Edg2 == (Standard_Boolean) e) U2 = Nod12PCu2;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::InitBiPointsWithConnexity : ";
cout << "Parameter error on Node " << i1p2 << endl;
Nod11PntZ = Z3;
if (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p1 << endl;
Nod12PntZ = Z3;
if (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U3;
else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p2 << endl;
Nod11PntZ = Z3;
if (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p1 << endl;
Nod21PntZ = Z3;
if (Nod21Edg1 == (Standard_Boolean) e) Nod21PCu1 = U3;
else if (Nod21Edg2 == (Standard_Boolean) e) Nod21PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i2p1 << endl;
Nod12PntZ = Z3;
if (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U3;
else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p2 << endl;
Nod22PntZ = Z3;
if (Nod22Edg1 == (Standard_Boolean) e) Nod22PCu1 = U3;
else if (Nod22Edg2 == (Standard_Boolean) e) Nod22PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i2p2 << endl;
Nod11PntZ = Z3;
if (Nod11Edg1 == (Standard_Boolean) e) Nod11PCu1 = U3;
else if (Nod11Edg2 == (Standard_Boolean) e) Nod11PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p1 << endl;
Nod21PntZ = Z3;
if (Nod21Edg1 == (Standard_Boolean) e) Nod21PCu1 = U3;
else if (Nod21Edg2 == (Standard_Boolean) e) Nod21PCu2 = U3;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i2p1 << endl;
Nod12PntZ = Z4;
if (Nod12Edg1 == (Standard_Boolean) e) Nod12PCu1 = U4;
else if (Nod12Edg2 == (Standard_Boolean) e) Nod12PCu2 = U4;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i1p2 << endl;
Nod22PntZ = Z4;
if (Nod22Edg1 == (Standard_Boolean) e) Nod22PCu1 = U4;
else if (Nod22Edg2 == (Standard_Boolean) e) Nod22PCu2 = U4;
-#ifdef DEB
+#ifdef HLRBREP_DEB
else {
cout << " HLRBRep_PolyAlgo::MoveOrInsertPoint : ";
cout << "Parameter error on Node " << i2p2 << endl;
if (thedico.IsNull()) thedico = new Dico_DictionaryOfInteger;
Standard_Integer& num = thedico->NewItem(command,deja,Standard_True);
if (deja) {
-#ifdef DEB
+#ifdef IFSELECT_DEB
cout<<"**** XSTEP commands, name conflict on "<<command<<" first defined remains ****"<<endl;
// Standard_DomainError::Raise("IFSelect_Activator : Add");
#endif
else {
Handle(IGESGraph_Color) color = Handle(IGESGraph_Color)::DownCast ( ent->Color() );
if ( color.IsNull() ) {
-#ifdef DEB
+#ifdef IGESCAFCONTROL_DEB
cout << "Error: Unrecognized type of color definition" << endl;
#endif
IsColor = Standard_False;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, localShape );
if ( FP->FindTypedTransient ( mapper, STANDARD_TYPE(IGESData_IGESEntity), Igesent ) ) {
Igesent->InitLevel( 0, localIntName );
-// #ifdef DEB
-// cout << "Init layer " << localIntName << " for "<< localShape.TShape()->DynamicType()->Name() << endl;
-// #endif
}
-#ifdef DEB
+#ifdef IGESCAFCONTROL_DEB
else cout << "Warning: Can't find entity for shape in mapper" << endl;
#endif
}
TopoDS_Edge edge3d = Lsewd3d->Edge (iedge), edge2d = Lsewd2d->Edge (iedge);
if (!IGESToBRep::TransferPCurve (edge2d, edge3d, myface)) continue;
if (sfe->FixReversed2d (edge3d, myface)) {
-#ifdef DEB
+#ifdef IGESCONTROL_DEB
cout << "Warning: IGESToBRep_IGESBoundary: 2D curve of edge was reversed" << endl;
#endif
}
Standard_Real maxdev = BRep_Tool::Tolerance (edge3d);
//pdn 08.04.99 S4135 recomputing only if deviation is greater than maxtol
if (maxdev > maxtol) { //:e2
-#ifdef DEB
+#ifdef IGESCONTROL_DEB
cout << "Warning: IGESToBRep_IGESBoundary: Deviation = " << maxdev << endl;
#endif
ShapeFix_ShapeTolerance().SetTolerance (edge3d, Precision::Confusion());
for (Standard_Integer ie = 1; ie <= iedge; ie++)
ShapeBuild_Edge().RemovePCurve (Lsewd3d->Edge (ie), myface);
if (Preferred3d) {
-#ifdef DEB
+#ifdef IGESCONTROL_DEB
cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 2D is ignored" << endl;
#endif
}
else {
-#ifdef DEB
+#ifdef IGESCONTROL_DEB
cout << "Warning: IGESToBRep_IGESBoundary: 3D and 2D curves are inconsistent; 3D is ignored" << endl;
#endif
Lsewd = Lsewd2d;
}
okCurve = okCurve && ShapeAlgo::AlgoContainer()->ConnectNextWire (saw, Lsewd, maxtol, distmin, revsewd, revnextsewd);
if (!okCurve) {
-#ifdef DEB
+#ifdef IGESCONTROL_DEB
cout << "Warning: IGESToBRep_IGESBoundary: Curves " << i - 1 << " and " << i << " cannot be connected" << endl;
#endif
Gsewd3d = new ShapeExtend_WireData;
if (!S) return Standard_False;
ComputeModel();
Standard_Integer nbEnt = themod->NbEntities();
-#ifdef DEBUG
+#ifdef IGESCONTROL_DEB
cout<<" IGES Write : "<<nbEnt<<" ent.s"<< flush;
#endif
if(!nbEnt)
IGESData_IGESWriter IW (themod);
// ne pas oublier le mode fnes ... a transmettre a IW
IW.SendModel (IGESSelect_WorkLibrary::DefineProtocol());
-#ifdef DEBUG
+#ifdef IGESCONTROL_DEB
cout<<" ... ecriture ..."<<flush;
#endif
if (fnes) IW.WriteMode() = 10;
Standard_Boolean status = IW.Print(S);
-#ifdef DEBUG
+#ifdef IGESCONTROL_DEB
cout<<" ... fichier ecrit ..."<<endl;
#endif
return status;
{
ofstream fout(file,ios::out);
if (!fout) return Standard_False;
-#ifdef DEBUG
+#ifdef IGESCONTROL_DEB
cout<<" Ecriture fichier ("<< (fnes ? "fnes" : "IGES") <<"): "<<file<<endl;
#endif
Standard_Boolean res = Write (fout,fnes);
const Handle(Interface_FileReaderData)& , const Standard_Integer ,
Handle(Interface_Check)& , const Handle(Standard_Transient)& ) const
{
-#ifdef DEB
+#ifdef IGESDATA_DEB
cout<<"IGESData_ReadWriteModule, Read called"<<endl;
#endif
}
Standard_Integer it = ent->TypeNumber();
if (it == 112 || it == 126) {
thefound = Standard_True;
-#ifdef DEB
+#ifdef IGESSELECT_DEB
cout<<"IGESSelect_SplineToBSpline : n0."<<i
<< (it == 112 ? ", Curve" : ", Surface")<<" to convert"<<endl;
#endif
olda = a; oldb = b; oldpcurve = newpcurve;
}
else {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "Warning: IGESToBRep::TransferPCurve: pcurves are not SameRange" << endl;
#endif
result = Standard_False;
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "\n**IGESToBRep::TransferPCurve: Exception in SameRange : ";
Standard_Failure::Caught()->Print(cout);
#endif
} //:36
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "\n** Exception in IGESToBRep_BasicCurve::TransferBasicCurve : ";
Standard_Failure::Caught()->Print(cout);
#endif
}
} //:h8
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "\n** Exception in IGESToBRep_BasicCurve::Transfer2dBasicCurve : ";
Standard_Failure::Caught()->Print(cout);
#endif
BSplineRes = new Geom_BSplineCurve(Poles, Weight, Knot, Mult, Degree);
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "\n** Exception in IGESToBRep_BasicCurve::TransferBSplineCurve during creation of Geom_BSplineCurve : ";
Standard_Failure::Caught()->Print(cout);
#endif
} //:36
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "\n** Exception in IGESToBRep_BasicSurface::TransferBasicSurface : ";
Standard_Failure::Caught()->Print(cout);
#endif
}
catch (Standard_Failure)
{
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "Warning: IgesToBRep_TopoSurface::"
"TransferSurfaceOfRevolution(): exception by Geom: ";
Standard_Failure::Caught()->Print ( cout ); cout << endl;
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "Warning: IgesToBRep_TopoSurface::TransferTabulatedCylinder(): exception by Geom: ";
Standard_Failure::Caught()->Print ( cout ); cout << endl;
#endif
if (myshape.IsNull()) {
//#55 rln 24.12.98 UKI60878 entity D593
-#ifdef DEB
+#ifdef IGESTOBREP_DEB
cout << "Fail: IGESToBRep_TopoSurface::TransferBoundedSurface UntrimmedSurface is translated into Null" << endl;
#endif
return res;
#endif
if (anImageFormat == FIF_UNKNOWN)
{
+#ifdef IMAGE_DEB
std::cerr << "Image_PixMap, image format doesn't supported!\n";
+#endif
return false;
}
{
return savePPM (theFileName);
}
+#ifdef IMAGE_DEB
std::cerr << "Image_PixMap, no image library available! Image saved in PPM format.\n";
+#endif
return savePPM (theFileName);
#endif
}
|| theImageRef->SizeY() != theImageNew->SizeY()
|| theImageRef->Format() != theImageNew->Format())
{
+#ifdef IMAGE_DEB
std::cerr << "Images has different format or dimensions\n";
+#endif
return Standard_False;
}
else if (!isSupportedFormat (theImageRef->Format()))
{
+#ifdef IMAGE_DEB
std::cerr << "Images has unsupported pixel format\n";
+#endif
return Standard_False;
}
else if (theImageRef->SizeX() >= 0xFFFF
|| theImageRef->SizeY() >= 0xFFFF)
{
+#ifdef IMAGE_DEB
std::cerr << "Image too large\n";
+#endif
return Standard_False;
}
if (!anImgRef->Load (theImgPathRef)
|| !anImgNew->Load (theImgPathNew))
{
+#ifdef IMAGE_DEB
std::cerr << "Failed to load image(s) file(s)\n";
+#endif
return Standard_False;
}
return Init (anImgRef, anImgNew, theToBlackWhite);
{
ProjLib_Plane aLineProj( thePln, theLine );
if (!aLineProj.IsDone()) {
-#ifdef DEB
+#ifdef INTCURVESURFACE_DEB
cout
<< "Info: IntCurveSurface_Inter::ProjectIntersectAndEstLim(), !aLineProj.IsDone()"
<< endl;
return; // not infinite curve
}
if (!aBasCurvProj.IsDone()) {
-#ifdef DEB
+#ifdef INTCURVESURFACE_DEB
cout << "Info: IntCurveSurface_Inter::EstLimForInfRevl(), !aBasCurvProj.IsDone()" << endl;
#endif
return;
{
//ddout << "IntCurveSurface_Polygon::ApproxParamOnCurve" << endl;
if(TheParamOnLine < 0.0 || TheParamOnLine >1.0) {
+#ifdef INTCURVESURFACE_DEB
cout<<" ParamOnLine = "<<TheParamOnLine<<" avec Index = "
<<TheIndex<<" dans IntCurveSurface_Polygon::ApproxParamOnCurve"<<endl;
+#endif
return(Binf+(TheParamOnLine*(Bsup-Binf))/(Standard_Real)(NbPntIn-1));
}
Standard_Integer Index = TheIndex;
Standard_Real ParamOnLine = TheParamOnLine;
+#ifdef INTCURVESURFACE_DEB
if (Index > NbPntIn) {
cout << "OutOfRange Polygon::ApproxParamOnCurve " <<endl;
}
+#endif
if((Index == NbPntIn) && (ParamOnLine == 0.0)) {
Index--; ParamOnLine=1.0;
}
break;
}
if(allon1==NbPnts || allon2==NbPnts) {
-#ifdef DEB
+#ifdef INTPATCH_DEB
cout<<" IntPatch_LineConstructor.gxx : CC**ONS"<<(allon1==NbPnts?1:2)<<"** Traitement WLIne + ARC CLASS "<<endl;
#endif
Standard_Real tol2d = Max(tol2d1,tol2d2);
if (!arc1.IsNull() && arc1 == arc) iv2 = iv;
}
if (!iv1 || !iv2) {
-#ifdef DEB
+#ifdef INTPATCH_DEB
cout<<" Pb getting vertices linked with arc"<<endl;
#endif
continue;
Standard_Real par2 = (arcsResolved(iv2).IsNull()
? (WLine->Vertex(iv2).*pParOnArc)()
: paramsResolved(iv2));
-#ifdef DEB
+#ifdef INTPATCH_DEB
cout<<"****** Parameters on arc on S"<<is+1<<": "<<par1<<" "<<par2<<endl;
#endif
}
Standard_Real par,dist;
if (!ProjectOnArc(utst,vtst,arc,surf,TolArc,par,dist)) {
-#ifdef DEB
+#ifdef INTPATCH_DEB
cout<<" Pb en projection ds IntPatch_LineConstructor"<<endl;
#endif
continue;
//if(nbvtx) {
// TabIndex[nbvtx]=TabIndex[1]=++numline;
// AddLine(L,1,nbvtx,typs1,typs2,TabIndex,slin);
-#if DEB
- //cout<<"\nIntPatch_LineConstructor : Cas de ligne ou firstp==lastp"<<endl;
-#endif
//}
}
//-- -------------------------------------------------------------------
wlin->ComputeVertexParameters(Tol, hasBeenAdded);
}
else {
-#ifdef DEB
- //if(rlin->NbVertex()==0) {
- // cout<<" \n *** IntPatch RstInt.gxx : nbvtx = 0 sur rline *** \n"<<endl;
- //}
-#endif
rlin->ComputeVertexParameters(Tol);
}
}
}
Line->SetTangentVector(previousd3d,j-1);
}
-#ifdef DEB
+#ifdef INTWALK_DEB
else {
cout<<" IntWalk_IWalking_2.gxx : bizarrerie 30 10 97 "<<endl;
}
{
Handle(Interface_Static) item = Interface_Static::Static(name);
if (item.IsNull()) {
-#ifdef DEB
+#ifdef INTERFACE_DEB
cout << "Warning: Interface_Static::CVal: incorrect parameter " << name << endl;
#endif
return "";
{
Handle(Interface_Static) item = Interface_Static::Static(name);
if (item.IsNull()) {
-#ifdef DEB
+#ifdef INTERFACE_DEB
cout << "Warning: Interface_Static::IVal: incorrect parameter " << name << endl;
#endif
return 0;
{
Handle(Interface_Static) item = Interface_Static::Static(name);
if (item.IsNull()) {
-#ifdef DEB
+#ifdef INTERFACE_DEB
cout << "Warning: Interface_Static::RVal: incorrect parameter " << name << endl;
#endif
return 0.0;
LDOM_MemManager::~LDOM_MemManager ()
{
-#ifdef DEB
+#ifdef LDOM_DEB
Standard_Integer aSomme = 0, aCount = 0;
MemBlock * aBlock = myFirstBlock;
//FILE * out = fopen ("/tmp/dump","w");
return Standard_False;
}
}
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout << "Classification impossible sur vertex " << endl;
#endif
}
else {
// Cas non traite : on est a cheval
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout <<" cas a cheval."<< endl;
#endif
}
else {
// Cas non traite : on est a cheval
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout <<" cas a cheval."<< endl;
#endif
// myLFrom.Append(edgf);
}
if (IsSame) {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout <<"memes bsplines."<< endl;
#endif
myLFrom.Append(edgf);
}
if (IsSame) {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout <<"memes beziers."<< endl;
#endif
myLFrom.Append(edgf);
for (itl.Initialize(itdmsls.Value());itl.More(); itl.Next()) {
if (theSubs.IsCopied(itl.Value())) {
if (theSubs.Copy(itl.Value()).Extent() != 1) {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout << "Invalid number of descendant" << endl;
#endif
return;
AddClosedWire(W,F);
}
} catch (Standard_Failure ) {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout << "Warning: SpliShape internal problem detected, some faces may be lost. Check input edges/wires" <<endl;
#endif
return;
Rebuild(myShape);
myDone = Standard_True;
}
-#ifdef DEB
+#ifdef LOCOPE_DEB
if (!myDblE.IsEmpty()) {
cout << "Le shape comporte des faces invalides" << endl;
}
Standard_Real f,l;
Handle(Geom2d_Curve) C2d = BRep_Tool::CurveOnSurface(edg,F,f,l);
if(C2d.IsNull()) {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout << "Edge is not on surface" <<endl;
#endif
return Standard_False;
theSubs.Substitute(ebase.Oriented(TopAbs_FORWARD),lsubs);
}
else {
-#ifdef DEB
+#ifdef LOCOPE_DEB
cout << "Pb pour substitution" << endl;
#endif
}
// Label array REsizing.
if (labAlloc < theLabels->Upper()) {
-#ifdef DEB
+#ifdef MDF_DEB
cout<<"MDF_Tool::WriteLabels LABEL array resizing from "<<theLabels->Upper()<<" to "<<labAlloc<<endl;
#endif
Handle(PColStd_HArray1OfInteger) newLabels =
// Attribute array REsizing.
if (attAlloc < theAttributes->Upper()) {
-#ifdef DEB
+#ifdef MDF_DEB
cout<<"MDF_Tool::WriteLabels ATTRIBUTES array resizing from "<<theAttributes->Upper()<<" to "<<attAlloc<<endl;
#endif
Handle(PDF_HAttributeArray1) newAttributes =
}
if (!noDeadLock) {
-#ifdef DEB
+#ifdef MDF_DEB
cout<<"AfterRetrieval(): dead lock between these attributes:"<<endl;
for (itr2.Initialize(attList); itr2.More(); itr2.Next())
cout<<"Attribute type = "<<itr2.Value()->DynamicType()->Name()<<endl;;
Handle(Standard_Transient) MDocStd::Factory(const Standard_GUID& aGUID) {
if(aGUID == StandardStorageDriver) {
-#ifdef DEB
+#ifdef MDOCSTD_DEB
cout << "MDocStd : Storage Plugin" << endl;
#endif
static Handle(MDocStd_DocumentStorageDriver) standard_sd = new MDocStd_DocumentStorageDriver;
return standard_sd;
}
if(aGUID == StandardRetrievalDriver) {
-#ifdef DEB
+#ifdef MDOCSTD_DEB
cout << "MDocStd : Retrieval Plugin" << endl;
#endif
static Handle (MDocStd_DocumentRetrievalDriver) standard_rd = new MDocStd_DocumentRetrievalDriver;
if( S->Width() != -1. ) T->SetWidth( S->Width() );
else T->UnsetWidth();
-#ifdef DEB
+#ifdef MPRSSTD_DEB
cout << "AISPresentationRetrievalDriver " << "retrieved DriverGUID ==> ";
guid.ShallowDump(cout);
cout << endl;
T->SetMode(S->Mode());
-#ifdef DEB
+#ifdef MPRSSTD_DEB
cout << "AISPresentationRetrievalDriver " << "retrieved DriverGUID ==> ";
guid.ShallowDump(cout);
cout << endl;
T->SetMode(S->Mode());
-#ifdef DEB
+#ifdef MPRSSTD_DEB
cout << "AISPresentationStorageDriver " << "storaged DriverGUID ==> " << guid->Convert() << endl;
#endif
}
Handle(Poly_PolygonOnTriangulation) aPoly1 =
BRep_Tool::PolygonOnTriangulation(aEdge, aT1, aLoc1);
if (aPoly1.IsNull() || aT1.IsNull()) {
-#ifdef DEB
+#ifdef MESHTEST_DEB
cout<<"problem getting PolygonOnTriangulation of edge "<<ie<<endl;
#endif
continue;
Handle(Poly_PolygonOnTriangulation) aPoly2 =
BRep_Tool::PolygonOnTriangulation(aEdge, aT2, aLoc2);
if (aPoly2.IsNull() || aT2.IsNull()) {
-#ifdef DEB
+#ifdef MESHTEST_DEB
cout<<"problem getting PolygonOnTriangulation of edge "<<ie<<endl;
#endif
continue;
{
delete aFile;
myStream = &std::cout;
+#ifdef MESSAGE_DEB
std::cerr << "Error opening " << theFileName << std::endl << std::flush;
+#endif
}
}
return MgtGeom::Translate(TOffsetCurve);
}
else {
+#ifdef MGTGEOM_DEB
cout << "MgtGeom : Unknown curve type ???? : " << endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Persistent Curve");
}
// POP pour NT
return MgtGeom::Translate(POffsetCurve);
}
else {
+#ifdef MGTGEOM_DEB
cout << "MgtGeom : Unknown curve type ????"<<endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Transient Curve");
}
return MgtGeom::Translate(TOffsetSurface);
}
else {
+#ifdef MGTGEOM_DEB
cout << "MgtGeom : Unknown surface type ????"<<endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Persistent Surface");
}
return MgtGeom::Translate(POffsetSurface);
}
else {
+#ifdef MGTGEOM_DEB
cout << "MgtGeom : Unknown surface type ????"<<endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Transient Surface");
}
// POP pour NT
return MgtGeom2d::Translate(TOffsetCurve);
}
else {
+#ifdef MGTGEOM2D_DEB
cout << "Unknown Geom2d curve type ???? " << endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Persistent Curve");
}
// POP pour NT
return MgtGeom2d::Translate(POffsetCurve);
}
else {
+#ifdef MGTGEOM2D_DEB
cout << "Unknown Geom2d curve type ???? " << endl;
+#endif
Standard_NullObject::Raise("No mapping for the current Transient Curve");
}
// POP pour NT
) {
if ( OSD_File::KindOfFile ( ) == OSD_DIRECTORY ) {
+#ifdef OSD_DEB
cout << " OSD_File::Read : it is a directory " << endl;
+#endif
return ;
// Standard_ProgramError::Raise("OSD_File::Read : it is a directory");
}
sprintf(full_name,"%s/%s",myPlace.ToCString(),
((struct dirent *)myEntry)->d_name); // LD debug
-#ifdef DEBUG
+#ifdef OSD_DEB
cout << "Place : " << myPlace << endl;
cout << "FName : " << full_name << endl;
#endif
MacExtract(aDependentName,myDisk,myTrek,myName,myExtension);
break;
default:
-#ifdef DEB
+#ifdef OSD_DEB
cout << " WARNING WARNING : OSD Path for an Unknown SYSTEM : " << (Standard_Integer)todo << endl;
#endif
break ;
if (aCurInfoHandle) {
// cout << "OSD::Handler: calling previous signal handler with info " << aCurInfoHandle << endl ;
(*aCurInfoHandle) (theSignal, aSigInfo, theContext);
+#ifdef OSD_DEB
cerr << " previous signal handler return" << endl ;
+#endif
return;
}
else {
if(aCurHandler) {
// cout << "OSD::Handler: calling previous signal handler" << endl ;
(*aCurHandler) (theSignal);
+#ifdef OSD_DEB
cerr << " previous signal handler return" << endl ;
+#endif
return;
}
}
Standard_DivideByZero::NewInstance("SIGTRAP IntegerDivideByZero")->Jump(); break;
#endif
default:
+#ifdef OSD_DEB
cout << "Unexpected signal " << theSignal << endl ;
+#endif
break;
}
}
OSD_SIGSEGV::NewInstance(Msg)->Jump();
}
}
+#ifdef OSD_DEB
else {
cout << "Wrong undefined address." << endl ;
}
+#endif
exit(SIGSEGV);
}
// scp->sc_pcoq_tail = scp->sc_pcoq_tail + 0x4 ; l'intruction suivant le segv.
}
}
+#ifdef OSD_DEB
else {
cout << "Wrong undefined address." << endl ;
}
+#endif
exit(SIGSEGV);
}
//stat = ieee_handler("set", "inexact", PHandler) || stat;
if (stat) {
+#ifdef OSD_DEB
cerr << "ieee_handler does not work !!! KO " << endl;
+#endif
}
#elif defined (linux)
feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
if ( first_time & 2 ) {
char *TRAP_FPE = getenv("TRAP_FPE") ;
if ( TRAP_FPE == NULL ) {
+#ifdef OSD_DEB
cout << "On SGI you must set TRAP_FPE environment variable : " << endl ;
cout << "set env(TRAP_FPE) \"UNDERFL=FLUSH_ZERO;OVERFL=DEFAULT;DIVZERO=DEFAULT;INT_OVERFL=DEFAULT\" or" << endl ;
cout << "setenv TRAP_FPE \"UNDERFL=FLUSH_ZERO;OVERFL=DEFAULT;DIVZERO=DEFAULT;INT_OVERFL=DEFAULT\"" << endl ;
+#endif
// exit(1) ;
first_time = first_time & (~ 2) ;
}
//==== Always detected the signal "SIGFPE" =================================
stat = sigaction(SIGFPE,&act,&oact); // ...... floating point exception
if (stat) {
+#ifdef OSD_DEB
cerr << "sigaction does not work !!! KO " << endl;
+#endif
perror("sigaction ");
}
{
if (theExtName == NULL)
{
+#ifdef OPENGL_DEB
std::cerr << "CheckExtension called with NULL string!\n";
+#endif
return Standard_False;
}
}
}
}
-#ifdef DEB
+#ifdef OPENGL_DEB
if( !status )
printf(" *** OpenGl_TelGetPolygonNormal.has found confused or aligned points\n");
#endif
d = vecnrmd( norm, d );
status = (d > 0.) ? 1 : 0;
}
-#ifdef DEB
+#ifdef OPENGL_DEB
if( !status )
printf(" *** OpenGl_TelGetNormal.has found confused or aligned points\n");
#endif
char line[100];
IS >> line;
if (strcmp(line,"Poly_Triangulation")) {
+#ifdef POLY_DEB
cout << "Not a Triangulation in the file" << endl;
+#endif
return Handle(Poly_Triangulation)();
}
char line[100];
IS >> line;
if (strcmp(line,"Poly_Polygon3D")) {
+#ifdef POLY_DEB
cout << "Not a Polygon3D in the file" << endl;
+#endif
return Handle(Poly_Polygon3D)();
}
char line[100];
IS >> line;
if (strcmp(line,"Poly_Polygon2D")) {
+#ifdef POLY_DEB
cout << "Not a Polygon2D in the file" << endl;
+#endif
return Handle(Poly_Polygon2D)();
}
if(!ExactBound(Triple, t - Step, Tol,
myTolU, myTolV, myCurve, mySurface))
{
-#if DEB
+#if PROJLIB_DEB
cout<<"There is a problem with ExactBound computation"<<endl;
#endif
DichExactBound(Triple, t - Step, Tol, myTolU, myTolV,
if(!ExactBound(Triple, t, Tol, myTolU, myTolV,
myCurve, mySurface))
{
-#if DEB
+#if PROJLIB_DEB
cout<<"There is a problem with ExactBound computation"<<endl;
#endif
DichExactBound(Triple, t, Tol, myTolU, myTolV,
OK = OK && Dummy->RemoveKnot(ij,MaxDeg-1,Tol3d); //OCC217
//OK = OK && Dummy->RemoveKnot(ij,MaxDeg-1,myTolerance);
}
-#ifdef DEB
+#ifdef PROJLIB_DEB
if (!OK) {
cout << "ProjLib_ComputeApproxOnPolarSurface : Smoothing echoue"<<endl;
}
gp_Pnt aPoint = aGProp.CentreOfMass();
gp_Vec aV1(theAx.Direction());
gp_Vec aV2(theAx.Location(), aPoint);
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
gp_Vec v1 = aV1.Crossed(aV2);
cout <<" Z of V1 = " << v1.XYZ().Z() << endl;
#endif
const TopoDS_Shape& newShape = ShapesIterator.Value ();
if (!Root.IsSame (newShape)) {
//put shapes with evolution 1:1 (may be Compound)
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
TCollection_AsciiString entry;
TDF_Tool::Entry(Builder.NamedShape()->Label(), entry);
cout << "Add shape to Compound at Label = "<< entry <<endl;
if(!IsDirectionPositive(theAx, aCP2, theArP.Value(i3))) {//first must be positive direction
// change i3 <=> i4
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout << "SortEdges4: i3 = "<<i3<< "i4 = "<< i4 << endl;
#endif
Standard_Integer aN = i4; i4 = i3;
}
// 4. final order i1, i2, i3, i4 - Ok
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout << "SortEdges4: i1 = " <<i1<<" i2 = "<<i2<< " i3 = "<<i3<< "i4 = "<< i4 << endl;
#endif
theArI.SetValue(1, i1);
const TopoDS_Shape& aV22 = TopExp::LastVertex(TopoDS::Edge(theArS.Value(j)));
if(aV12.IsSame(aV21) || aV12.IsSame(aV22)) {
aV2 = aV12; J2 = j;
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
if(I != i) cout << "WARNING:: I != i, I = " << I << ", i = " << i <<endl;
#endif
found = Standard_True;
}
for(i=1;i<=ArI.Upper();i++) {
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout << "SortEdges: i = " <<i<<" ArI.Value(i) = " <<ArI.Value(i)<< endl;
#endif
theARS.SetValue(i, ArS.Value(ArI.Value(i)));
const TopAbs_ShapeEnum& TypeSh = ShapeType(ObjSh);
if (ResSh.IsNull()) {
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout<<"QANewBRepNaming_Cut::Load(): The result of the boolean operation is null"<<endl;
#endif
return;
// If the shapes are the same - select the result and exit:
if (IsResultChanged(MS)) {
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout<<"QANewBRepNaming_Cut::Load(): The object and the result of CUT operation are the same"<<endl;
#endif
if (MS.Shape().ShapeType() == TopAbs_COMPOUND) {
if (Type == QANewBRepNaming_SOLID) Builder.Generated (mkCylinder.Solid());
else if (Type == QANewBRepNaming_SHELL) Builder.Generated (mkCylinder.Shell());
else {
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout<<"QANewBRepNaming_Cylinder::Load(): Unexpected type of result"<<endl;
Builder.Generated (mkCylinder.Shape());
#endif
gp_Vec aMainVec(P1, P2);
gp_Vec aV1(P1, EP1);
gp_Vec aV2(P1, EP2);
-#ifdef DEB
+#ifdef QANEWBREPNAMING_DEB
cout << "P1=" << P1.X() << " " << P1.Y() << " " << P1.Z() << endl;
cout << "P2=" << P2.X() << " " << P2.Y() << " " << P2.Z() << endl;
cout << "EP1=" << EP1.X() << " " << EP1.Y() << " " << EP1.Z() << endl;
myMapGener(theFace).Append (aListGener);
}
}
-#ifdef DEB
+#ifdef QANEWODTOPOPE_DEB
else if (!aListW.IsEmpty()) {
cout<<"QANewModTopOpe_Glue::SectionInsideFace : can't connect edges"<<endl;
}
Standard_Integer NbComp = theTypes.Length();
if (NbComp < 2) {
-#ifdef DEB
+#ifdef RWSTEPAP214_DEB
cout << "Not a Plex" << endl;
#endif
}
const Handle(Standard_Transient)&ent) const
{
if (CN == 0) {
-#ifdef DEB
+#ifdef RWSTEPAP214_DEB
cout << "CN = 0 for num = " << num << endl;
#endif
return;
Standard_Boolean sharOE1 = aShto.IsShared(theOE1);
if(!sharOE1){
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "OrientedEdge1 not shared" <<endl;
#endif
}
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
Standard_Boolean sharEL1 = aShto.IsShared(theEL1);
if(!sharEL1) {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop1 not shared" <<endl;
#endif
}
theFBOri1 = theFOB1->Orientation();
}
else {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop not referenced by FaceBound" << endl;
#endif
}
}
else {
if (nbRef == 0) {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "OrientedEdge not referenced" << endl;
#endif
}
else {
if (aShto.NbTypedSharings(theOE1,
STANDARD_TYPE(StepShape_EdgeLoop)) > 1) {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "OrientedEdge referenced more than once" << endl;
#endif
}
Standard_Boolean sharOE2 = aShto.IsShared(theOE2);
if(!sharOE2){
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "OrientedEdge2 not shared" <<endl;
#endif
}
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
if(!sharEL2){
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop2 not shared" <<endl;
#endif
}
theFBOri2 = theFOB2->Orientation();
}
else {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop not referenced by FaceBound" << endl;
#endif
}
Standard_Boolean sharOE2 = aShto.IsShared(theOE2);
if(!sharOE2){
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "OrientedEdge2 not shared" <<endl;
#endif
}
Handle(StepShape_EdgeLoop)::DownCast(myShRef.Value());
Standard_Boolean sharEL2 = aShto.IsShared(theEL2);
if(!sharEL2){
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop2 not shared" <<endl;
#endif
}
theFBOri2 = theFB2->Orientation();
}
else {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "EdgeLoop not referenced by FaceBound" << endl;
#endif
}
} //end for(i=1; i<=nbEdg; ...)
} //end if(!theEL1.IsNull)
else {
-#ifdef DEB
+#ifdef RWSTEPSHAPE_DEB
cout << "no EdgeLoop in FaceBound" << endl;
#endif
}
IsAscii = Standard_False;
}
}
-#ifdef DEB
+#ifdef RWSTL_DEB
cout << (IsAscii ? "ascii\n" : "binary\n");
#endif
file.Close();
// skip header
while (getc(file) != '\n');
-#ifdef DEB
+#ifdef RWSTL_DEB
cout << "start mesh\n";
#endif
ReadMesh = new StlMesh_Mesh();
if (++iTri % IND_THRESHOLD == 0)
aPS.Next();
}
-#ifdef DEB
+#ifdef RWSTL_DEB
cout << "end mesh\n";
#endif
fclose(file);
static Handle(TCollection_HAsciiString) ap214 = new TCollection_HAsciiString ( "STEP AP214" );
if ( ! format->IsSameString ( ap203, Standard_False ) &&
! format->IsSameString ( ap214, Standard_False ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: STEPCAFControl_Reader::Transfer: Extern document is neither STEP AP203 nor AP214" << endl;
#else
continue;
#endif
}
}
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
else cout << "Warning: STEPCAFControl_Reader::Transfer: Extern document format not defined" << endl;
#endif
cout<<"filename="<<filename<<endl;
if ( ! filename || ! filename[0] ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: STEPCAFControl_Reader::Transfer: Extern reference file name is empty" << endl;
#endif
continue; // not a valid extern ref
return EF->GetLabel();
}
}
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
if ( ! EF->GetLabel().IsNull() )
cout << "Warning: STEPCAFControl_Reader::AddShape: Non-empty shape with external ref; ref is ignored" << endl;
else if ( nbComponents <=0 )
return myFiles->Item ( file );
}
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Reading extern file: " << fullname << endl;
#endif
{
STEPConstruct_Styles Styles ( WS );
if ( ! Styles.LoadStyles() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: no styles are found in the model" << endl;
#endif
return Standard_False;
Handle(Transfer_TransientProcess) TP = Tool.TransientProcess();
Handle(Transfer_Binder) binder = TP->Find(NAUO);
if ( binder.IsNull() || ! binder->HasResult() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl;
#endif
return L;
TopoDS_Shape S = TransferBRep::ShapeResult ( TP, binder );
if ( S.IsNull() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl;
#endif
return L;
TColStd_SequenceOfTransient props;
STEPConstruct_ValidationProps Props ( WS );
if ( ! Props.LoadProps ( props ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: no validation props found in the model" << endl;
#endif
return Standard_False;
Interface_EntityIterator subs = WS->Graph().Sharings(SVPLA);
for (subs.Start(); subs.More(); subs.Next()) {
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepVisual_Invisibility)) ) continue;
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout<< "\tLayer \"" << aLayerName << "\" is invisible"<<endl;
#endif
//TDF_Label InvLayerLab = LTool->FindLayer(aLayerName);
Handle(StepRepr_NextAssemblyUsageOccurrence) NUNAUO =
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast(SHUO->NextUsage());
if ( UUNAUO.IsNull() || NUNAUO.IsNull() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ <<": Upper_usage or Next_usage of styled SHUO is null. Skip it" << endl;
#endif
return aMainLabel;
STEPConstruct_Styles Styles ( WS );
if ( ! Styles.LoadStyles() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: no styles are found in the model" << endl;
#endif
return Standard_False;
if ( style != aHSeqOfInvisStyle->Value( si ) )
continue;
// found that current style is invisible.
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: item No " << i << "(" << style->Item()->DynamicType()->Name() << ") is invisible" << endl;
#endif
IsVisible = Standard_False;
// set the SHUO structure to the document
TDF_Label aLabelForStyle = setSHUOintoDoc( WS, SHUO, STool, PDFileMap, ShapeLabelMap );
if ( aLabelForStyle.IsNull() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ <<": coudnot create SHUO structure in the document" << endl;
#endif
continue;
// construct extern file name
TCollection_AsciiString fname = OSD_Path::AbsolutePath ( dpath, EF->GetName()->String() );
if ( fname.Length() <= 0 ) fname = EF->GetName()->String();
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Writing external file: " << fname.ToCString() << endl;
#endif
Handle(STEPCAFControl_ActorWrite)::DownCast ( writer.WS()->NormAdaptor()->ActorWrite() );
// translate free top-level shapes of the DECAF document
-#ifdef DEB // includes Transfer_ActorOfFinderProcess
-// cout << "Actor is " << writer.WS()->NormAdaptor()->ActorWrite()->DynamicType()->Name() << endl;
-#endif
Standard_Integer ap = Interface_Static::IVal ("write.step.schema");
TDF_LabelSequence sublabels;
for ( Standard_Integer i=1; i <= labels.Length(); i++ ) {
Handle(StepShape_ShapeDefinitionRepresentation) SDR;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S );
if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << endl;
#endif
continue;
StepRepr_RepresentedDefinition RD = SDR->Definition();
Handle(StepRepr_PropertyDefinition) aPropDef = RD.PropertyDefinition();
if (aPropDef.IsNull()) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: STEPCAFControl_Writer::WriteExternRefs StepRepr_PropertyDefinition is null for " << S.TShape()->DynamicType()->Name() << endl;
#endif
continue;
StepRepr_CharacterizedDefinition CharDef = aPropDef->Definition();
Handle(StepBasic_ProductDefinition) PD = CharDef.ProductDefinition();
if (PD.IsNull()) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: STEPCAFControl_Writer::WriteExternRefs StepBasic_ProductDefinition is null for " << S.TShape()->DynamicType()->Name() << endl;
#endif
continue;
TopLoc_Location L;
TColStd_SequenceOfTransient seqRI;
Standard_Integer nb = FindEntities ( Styles.FinderProcess(), S, L, seqRI );
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
if ( nb <=0 ) cout << "Warning: Cannot find RI for " << S.TShape()->DynamicType()->Name() << endl;
#endif
//Get overridden style gka 10.06.03
// Skip assemblies: colors assigned to assemblies and their instances
// are not supported (it is not clear how to encode that in STEP)
if ( XCAFDoc_ShapeTool::IsAssembly ( L ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: Cannot write color for Assembly" << endl;
cout << "Info: Check for colors assigned to components in assembly" << endl;
#endif
if (!isComponent) {
if ( myMapCompMDGPR.IsBound( aTopSh )) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cerr << "Error: Current Top-Level shape have MDGPR already " << endl;
#endif
}
Handle(StepShape_ShapeDefinitionRepresentation) SDR;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FP, S );
if ( ! FP->FindTypedTransient ( mapper, STANDARD_TYPE(StepShape_ShapeDefinitionRepresentation), SDR ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: Cannot find SDR for " << S.TShape()->DynamicType()->Name() << endl;
#endif
continue;
Standard_Boolean isLinv = Standard_False;
if (L.FindAttribute(XCAFDoc::InvisibleGUID(), aUAttr)) {
descr = new TCollection_HAsciiString ("invisible");
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
FP->Messenger() << "\tLayer \"" << hName->String().ToCString() << "\" is invisible"<<endl;
#endif
isLinv = Standard_True;
// Handle(XCAFDoc_GraphNode) NuSHUO;
if ( aNextUsageLabs.Length() > 0) {
// store SHUO recursive
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
if ( aNextUsageLabs.Length() > 1 )
cout << "Warning: store only one next_usage of current SHUO" << endl;
#endif
Handle(StepRepr_NextAssemblyUsageOccurrence) UUNAUO, NUNAUO;
if (!getProDefinitionOfNAUO( WS, aUUSh, nullPD, UUNAUO, Standard_True ) ||
!getProDefinitionOfNAUO( WS, aNUSh, aRelatedPD, NUNAUO, Standard_False )) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: cannot get related or relating PD" << endl;
#endif
return Standard_False;
TopLoc_Location L;
TColStd_SequenceOfTransient seqRI;
FindEntities ( FP, Sh, L, seqRI );
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
if ( seqRI.Length() <=0 )
FP->Messenger() << "Warning: Cannot find RI for " << Sh.TShape()->DynamicType()->Name() << endl;
#endif
// do it by additing styled item to the MDGPR
if ( !aTopSh.IsNull() && !myMapCompMDGPR.IsBound( aTopSh ) ) {
// create MDGPR and record it in model
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ << ": Create new MDGPR for SHUO instance" << endl;
#endif
Handle(StepVisual_MechanicalDesignGeometricPresentationRepresentation) aMDGPR;
}
else {
WS->Model()->AddWithRefs ( STEPstyle ); // add as root to the model, but it is not good
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ << ": adds styled item of SHUO as root, casue cannot find MDGPR" << endl;
#endif
}
// check if it is styled SHUO
XCAFPrs_Style SHUOstyle;
if ( !getSHUOstyle ( aSHUOlab, CTool, SHUOstyle ) ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ << ": do not store SHUO without any style to the STEP model" << endl;
#endif
continue;
// create the top SHUO and all other.
writeSHUO( aSHUO, CTool->ShapeTool(), WS, anEntOfSHUO, NAUOShape, aRelatingPD, isDeepest );
if ( anEntOfSHUO.IsNull() || NAUOShape.IsNull() ) {
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Warning: " << __FILE__ << ": Cannot store SHUO" << endl;
#endif
continue;
}
// create new Product Definition Shape for TOP SHUO
-#ifdef DEB
+#ifdef STEPCAFCONTROL_DEB
cout << "Info: " << __FILE__ << ": Create NEW PDS for current SHUO " << endl;
#endif
Handle(StepRepr_ProductDefinitionShape) PDS = new StepRepr_ProductDefinitionShape;
Handle(StepRepr_RepresentationItem) item;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FinderProcess, Shape );
FinderProcess->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_RepresentationItem), item);
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
if ( item.IsNull() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << endl;
else cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << endl;
#endif
mapper = TransferBRep::ShapeMapper ( FinderProcess, S );
FinderProcess->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_RepresentationItem), item);
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
if ( item.IsNull() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem not found" << endl;
else if ( Loc != Shape.Location() ) cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found for shape without location: " << item->DynamicType()->Name() << endl;
else cout << Shape.TShape()->DynamicType()->Name() << ": RepItem found: " << item->DynamicType()->Name() << endl;
Handle(StepRepr_NextAssemblyUsageOccurrence)::DownCast
( CDSR->RepresentedProductRelation()->Definition().ProductDefinitionRelationship() );
if ( nauo.IsNull() ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Warning: No NAUO found in CDSR !" << endl;
#endif
return Standard_False;
return Standard_True;
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Warning: SRR and NAUO are incompatible" << endl;
// cout << "NAUO = " << Model->StringLabel(nauo)->ToCString() <<
// ",\tCDSR = " << Model->StringLabel(CDSR)->ToCString() << endl;
// search for Document file
Handle(StepBasic_DocumentFile) DocFile;
if ( aPDWAD.IsNull() ) { // shoudnot be begin from TRJ11
-// #ifdef DEB
-// cout << "Warning: Cannot find PDWAD corresponding to ADR to search Document File. " << endl;
-// cout << "Info: Looking for Document File direct from ARD" << endl;
-// #endif
// lookinf from ADR
subs4 = Graph().Shareds(ADR);
} else
// search for Document file
Interface_EntityIterator subs4;
if ( aPDWAD.IsNull() ) { // shoudnot be begin from TRJ11
-// #ifdef DEB
-// cout << "Warning: Cannot find PDWAD corresponding to ADR to search Document File. " << endl;
-// cout << "Info: Looking for DocumentFile direct from ARD" << endl;
-// #endif
// lookinf from ADR
subs4 = Graph().Shareds(ADR);
} else
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FinderProcess(), Shape );
Handle(StepShape_ShapeRepresentation) sr;
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepShape_ShapeRepresentation), sr) ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": SR found: " << sr->DynamicType()->Name() << endl;
#endif
Context = sr->ContextOfItems();
else {
Handle(StepGeom_GeometricRepresentationItem) item;
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepGeom_GeometricRepresentationItem), item) ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "Context of " << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << endl;
#endif
Interface_EntityIterator subs = Graph().Sharings(item);
for (subs.Start(); Context.IsNull() && subs.More(); subs.Next()) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << endl;
#endif
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)) ) continue;
}
}
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
if ( Context.IsNull() ) {
cout << Shape.TShape()->DynamicType()->Name() << ": Cannot find context" << endl;
}
}
if ( items.Length() <1 ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Error: no color is supplied" << endl;
#endif
return PSA;
else if ( name.IsEqual ( "black" ) ) Col.SetValues ( Quantity_NOC_BLACK );
else if ( name.IsEqual ( "white" ) ) Col.SetValues ( Quantity_NOC_WHITE );
else {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Error: color name \"" << name << "\" is not recognized" << endl;
#endif
return Standard_False;
lengthDone = planeAngleDone = solidAngleDone = Standard_False;
if (aContext.IsNull()) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout<<" -- STEPConstruct_UnitContext:ComputeFactor, Context undefined -> default"<<endl;
#endif
return 1;
for (Standard_Integer i = 1; i <= nbU; i++) {
Handle(StepBasic_NamedUnit) theNamedUnit = aContext->UnitsValue(i);
status = ComputeFactors(theNamedUnit);
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
if(status == -1)
cout << " -- STEPConstruct_UnitContext:ComputeFactor: Unit item no." << i << " is not recognized" << endl;
#endif
}
else {
status = 14;
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Error in the file : parameter double defined" << endl;
#endif
}
}
else {
status = 14;
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Error in the file : parameter double defined" << endl;
#endif
}
// Defining a type of unit
if(!parameterDone) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Unit Type not implemented" << endl;
#endif
return 0;
lengthDone = Standard_True;
else {
status = 14;
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Error in the file : LengthFactor double defined" << endl;
#endif
}
for (Standard_Integer un = 1 ; un <= nbUncertainty ; un ++) {
Handle(StepBasic_UncertaintyMeasureWithUnit) aUMWU = aContext->UncertaintyValue(un);
if (aUMWU.IsNull()) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout<<"BAD Uncertainty Measure with Units, n0."<<un<<endl;
#endif
continue;
}
}
-#ifdef DEBUG
+#ifdef STEPCONSTRUCT_DEB
if (hasUncertainty) cout << "UNCERTAINTY read as " << theUncertainty << endl;
#endif
return status;
Handle(TransferBRep_ShapeMapper) mapper = TransferBRep::ShapeMapper ( FinderProcess(), Shape );
Handle(Transfer_Binder) binder = FinderProcess()->Find ( mapper );
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "\n>========------" << endl;
// cout << "Binders for " << Shape.TShape()->DynamicType()->Name() << " " << *(void**)&Shape.TShape() << ", Loc = " << *(void**)&Shape.Location() << endl;
// cout << "mapper = " << *(void**)&mapper << ", binder = " << *(void**)&binder << endl;
target.SetValue ( CDSR->RepresentedProductRelation() );
Context = CDSR->RepresentationRelation()->Rep2()->ContextOfItems();
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
else cout << "INSTANCE: CDRS from NAUO NOT found" << endl;
#endif
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
else cout << "INSTANCE: NAUO NOT found" << endl;
#endif
*/
PDS = Handle(StepRepr_ProductDefinitionShape)::DownCast(subs1.Value());
}
target.SetValue ( PDS );
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "COMPOUND: SDR found: " << sdr->DynamicType()->Name() << endl;
#endif
}
else {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "COMPOUND: ProdDef NOT found" << endl;
#endif
Handle(StepShape_ShapeRepresentation) SR;
else {
Handle(StepGeom_GeometricRepresentationItem) item;
if ( FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepGeom_GeometricRepresentationItem), item) ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem found: " << item->DynamicType()->Name() << endl;
#endif
// find PDS (GRI <- SR <- SDR -> PDS)
Handle(StepRepr_ProductDefinitionShape) PDS;
Interface_EntityIterator subs = Graph().Sharings(item);
for (subs.Start(); PDS.IsNull() && subs.More(); subs.Next()) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
// cout << "Parsing back refs: found " << subs.Value()->DynamicType()->Name() << endl;
#endif
if ( ! subs.Value()->IsKind(STANDARD_TYPE(StepShape_ShapeRepresentation)) ) continue;
if ( aspect.IsNull() ) {
// if ( ! FinderProcess()->FindTypedTransient (mapper,STANDARD_TYPE(StepRepr_ShapeAspect), aspect ) ||
// aspect->OfShape() != PDS )
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT NOT found, creating" << endl;
#endif
// create aspect and all related data
}
// SHAPE_ASPECT found, but we also need context: FIND IT !!!!
else {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << Shape.TShape()->DynamicType()->Name() << ": SHAPE_ASPECT found" << endl;
#endif
Handle(StepRepr_ProductDefinitionShape) aPDS = aspect->OfShape();
if ( ! aspect.IsNull() ) target.SetValue ( aspect );
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
else cout << Shape.TShape()->DynamicType()->Name() << ": PDS NOT found, fail to create SHAPE_ASPECT" << endl;
#endif
}
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
else cout << Shape.TShape()->DynamicType()->Name() << ": GeomRepItem NOT found" << endl;
#endif
}
if ( Name == "AREA_MEASURE" ) isArea = Standard_True;
else if ( Name == "VOLUME_MEASURE" ) isArea = Standard_False;
else {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Warning: Measure " << Model()->StringLabel ( M ) << " is neither area not volume" << endl;
#endif
return Standard_False;
Handle(StepGeom_CartesianPoint) P = Handle(StepGeom_CartesianPoint)::DownCast ( item );
if ( P.IsNull() || P->NbCoordinates() != 3 ) {
-#ifdef DEB
+#ifdef STEPCONSTRUCT_DEB
cout << "Warning: Point " << Model()->StringLabel ( P ) << " is not valid for centroid" << endl;
#endif
return Standard_False;;
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
-#ifdef DEB
+#ifdef STEPCONTROL_DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
Handle(TCollection_HAsciiString) aPPVersion = aFileNameEntity->PreprocessorVersion();
if(aPPVersion.IsNull())
continue;
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "Preprocessor version detected: " << aPPVersion->ToCString() << endl;
#endif
Standard_Integer anIDeasResult = aPPVersion->Search("I-DEAS");
if (anIDeasResult != -1) {
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "Recognized as I-DEAS STP" << endl;
#endif
myNMTool.SetIDEASCase(Standard_True);
if ( isNMMode && sr->IsKind(STANDARD_TYPE(StepShape_NonManifoldSurfaceShapeRepresentation)) ) {
isManifold = Standard_False;
NM_DETECTED = Standard_True;
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
Standard_Integer NMSSRItemsLen = sr->Items()->Length();
cout << "NMSSR with " << NMSSRItemsLen << " items detected" << endl;
#endif
if (isNMMode && myNMTool.IsIDEASCase() && isIDeasMode) {
isManifold = Standard_False;
NM_DETECTED = Standard_True;
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "I-DEAS post processing for non-manifold topology ENABLED" << endl;
#endif
}
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
else if ( myNMTool.IsIDEASCase() )
cout << "I-DEAS post processing for non-manifold topology DISABLED" << endl;
#endif
TP->Bind(sr, shbinder);
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
DumpWhatIs(comp);
#endif
if (subCheckStatus != BRepCheck_NoError)
brepBuilder.Add(result, currentFace);
else {
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "Redundant closing face detected: REMOVED from shell";
#endif
}
// Purpose: Use it in DEB mode to dump your shapes
// ============================================================================
-#ifdef DEB
+#ifdef STEPCONTROL_DEB
static void DumpWhatIs(const TopoDS_Shape& S) {
TopTools_MapOfShape aMapOfShape;
aBrepBuilder.Add(aDirectShapes, aDirectChild);
}
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
DumpWhatIs(aDirectShapes);
#endif
TopExp::MapShapesAndAncestors(aDirectShapes, TopAbs_EDGE, TopAbs_FACE, aMapEdgeFaces);
Standard_Integer aNbEdges = aMapEdgeFaces.Extent();
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "Checking whether the topology passed is manifold..." << endl;
#endif
}
}
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "Check result: "
<< (aResult ? "TRUE" : "FALSE") << endl;
#endif
}
if ( aResult.IsNull() ) {
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "\nNew NMSSR created" << endl;
#endif
aResult = new StepShape_NonManifoldSurfaceShapeRepresentation;
isNMSSRCreated = Standard_True;
} else {
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
cout << "\nExisting NMSSR is used" << endl;
#endif
isNMSSRCreated = Standard_False;
//:abv 20.05.02: writing box & face from it (shared) in one compound
// as assembly - while face already translated, it should be
// re-translated to break sharing
-#ifdef DEB
+#ifdef STEPCONTROL_DEB
cout << "Warning: STEPControl_ActorWrite::TransferShape(): shape already translated" << endl;
#endif
// return binder;
BRep_Builder aB;
aB.MakeCompound(aCompOfVrtx);
- #ifdef DEB
+ #ifdef STEPCONTROL_DEB
if (!isManifold)
cout << "Exploding Solids to Shells if any..." << endl;
#endif
break;
}
if (iSexclude) {
-#ifdef DEB
+#ifdef STEPCONTROL_DEB
cout << "Warning: STEPControl_Reader::NbRootsForTransfer exclude PDWAD from roots" << endl;
#endif
continue;
}
if (aHasChanged)
distmin = Sqrt (distmin2);
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout<<"ShapeAnalysis_Geom:Project, param="<<param<<" -> distmin="<<distmin<<endl;
#endif
}
catch(Standard_Failure) {
OK = Standard_False;
-#ifdef DEB //:s5
+#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Curve::ProjectAct(): Exception in Extrema_ExtPC: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
if (First < cf) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
#endif
First = cf;
}
else if (First > cl) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
#endif
First = cl;
}
if (Last < cf) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
#endif
Last = cf;
}
else if (Last > cl) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
#endif
Last = cl;
if ( theCurve->Value(First).Distance(theCurve->Value(cf)) < preci ) First = cf;
if ( theCurve->Value(Last).Distance(theCurve->Value(cl)) < preci ) Last = cl;
if ( First > Last ) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = First;
// illegal sur une courbe fermee non periodique
// on inverse quand meme les parametres !!!!!!
else {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = First;
}
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
else if ( First > Last ) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
First = theCurve->ReversedParameter ( First );
}
}
else {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "UpdateParam3d Failed" << endl;
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
cout << " - Param 1 : " << First << endl;
#endif
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
if ( First > Last ) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
First = theCurve->ReversedParameter ( First );
}
catch(Standard_Failure) {
iso.Nullify();
-#ifdef DEB //:s5
+#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Surface, ComputeIso(): Exception in UVIso(): ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
gp_Pnt2d prev(S,T);
gp_Pnt2d solution;
if (SurfaceNewton(prev,P3D,preci,solution)) {
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout <<"Newton found point on conic extrusion"<<endl;
#endif
return solution;
}
-#ifdef DEBUG
+#ifdef SHAPEANALYSIS_DEB
cout <<"Newton failed point on conic extrusion"<<endl;
#endif
uf = -500;
}
else {
-#ifdef DEB
+#ifdef SHAPEANALYSIS_DEB
cout << "Warning: ShapeAnalysis_Surface::ValueOfUV(): Extrema failed, doing Newton" << endl;
#endif
// on essai sur les bords
//szv#4:S4163:12Mar99 optimized
S = (Precision::IsInfinite(uf))? 0 : (uf+ul) / 2.;
T = (Precision::IsInfinite(vf))? 0 : (vf+vl) / 2.;
-#ifdef DEB //:s5
+#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Surface::ValueOfUV(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
} // fin try RAJOUT
catch(Standard_Failure) {
theMin = RealLast(); // theMin de depart
-#ifdef DEB //:s5
+#ifdef SHAPEANALYSIS_DEB //:s5
cout << "\nWarning: ShapeAnalysis_Curve::UVFromIso(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEBUILD_DEB
cout << "\nWarning: ShapeBuild_Edge: Exception in BuildCurve3d: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
{
BRepBuilderAPI_MakeEdge ME (curve, p1, p2);
if (!ME.IsDone()) {
-#ifdef DEB
+#ifdef SHAPEBUILD_DEB
cout << "\nWarning: ShapeBuild_Edge::MakeEdge BRepAPI_NotDone";
#endif
return;
{
BRepBuilderAPI_MakeEdge ME (pcurve, S, p1, p2);
if (!ME.IsDone()) {
-#ifdef DEB
+#ifdef SHAPEBUILD_DEB
cout << "\nWarning: ShapeBuild_Edge::MakeEdge BRepAPI_NotDone";
#endif
return;
aBSpline = GeomConvert::CurveToBSplineCurve(C3D,Convert_QuasiAngular);
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: GeomConvert_ApproxSurface Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
Handle(Geom_BSplineCurve) bspl = ConvertCurveToBSpline(basis, VF, VL, Tol3d, cnt, MaxSegments, MaxDegree);
gp_Ax1 axis = revol->Axis();
Handle(Geom_SurfaceOfRevolution) newRevol = new Geom_SurfaceOfRevolution(bspl,axis);
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout <<" Revolution on offset converted" << endl;
#endif
S = newRevol;
Standard_Boolean Done = anApprox.IsDone();
if (anApprox.MaxError() <= Tol3d && Done) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
Standard_Integer nbOfSpan = (anApprox.Surface()->NbUKnots()-1)*(anApprox.Surface()->NbVKnots()-1);
cout << "\terror = " << anApprox.MaxError() << "\tspans = " << nbOfSpan << endl;
cout << " Surface is aproximated with continuity " << (GeomAbs_Shape)cnt <<endl;
else {
if(anApprox.HasResult())
errSpl = Handle(Geom_BSplineSurface)::DownCast(anApprox.Surface());
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "\terror = " << anApprox.MaxError() <<endl;
#endif
break;
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
return (i <= edges->Length());
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout<<"Error: ShapeConstruct::JoinPCurves Exception in GeomConvert_CompCurveToBSplineCurve: ";
Standard_Failure::Caught()->Print(cout); cout<<endl;
#endif
bspl = GeomConvert::CurveToBSplineCurve(tc);
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in GeomConvert: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
return bspl;
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
bspl = Conv.Curve();
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
bspl = Geom2dConvert::CurveToBSplineCurve(tc);
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Geom2dConvert: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
return bspl;
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Segment: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
bspl = Conv.Curve();
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_Curve::ConvertToBSpline(): Exception in Approx_Curve3d: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if ( bspl->Knot(i+1) > First && bspl->Knot(i) < Last ) nint++;
Standard_Integer minPnt = nint * ( bspl->Degree() + 1 );
while ( nbPini < minPnt ) nbPini += NCONTROL - 1;
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
if ( nbPini > NCONTROL )
cout << "Warning: number of points for projecting is " << nbPini << endl;
#endif
if ( appr.IsDone() )
c2d = appr.Curve2d();
}
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
else
cout<<"Warning: ProjLib cutting pcurve "<< First << " -> " << ubeg <<" ; "<< Last << " -> " << ufin << endl;
#endif
}
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
else cout<<"Warning: ProjLib "<< nbSol << " curves in ProjLib"<<endl;
#endif
if(c2d.IsNull()) {
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::PerformByProjLib(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
Handle(Geom2d_TrimmedCurve) TC = Handle(Geom2d_TrimmedCurve)::DownCast ( result );
result = TC->BasisCurve();
}
-#ifdef DEB
-// if ( ! result.IsNull() ) cout << "SC_PCONS: analitic projection on plane" << endl;
-#endif
+
return result;
}
Standard_Real Up = ul - uf;
Standard_Real Vp = vl - vf;
Standard_Real dist2d;
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
if (mySurf->IsUClosed(myPreci) && mySurf->IsVClosed(myPreci)) {//#78 rln 12.03.99 S4135
cout << "WARNING : Recadrage incertain sur U & VClosed" << endl;
}
pnt2d (i) = newCurr;
}
// on verifie
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
dist2d = pnt2d (i-1).Distance(pnt2d (i));
if (dist2d > ( Vp / 2) ) {
cout << "Echec dans le recadrage" << endl;
return C2d;
}
catch(Standard_Failure) {
-#ifdef DEB //:s5
+#ifdef SHAPECONSTRUCT_DEB //:s5
// debug ...
Standard_Integer nbp = params->Length();
Standard_Integer nb2 = points2d->Length();
if (myInterPol2d.IsDone()) C2d = myInterPol2d.Curve();
}
catch(Standard_Failure) {
-#ifdef DEB //:s5
+#ifdef SHAPECONSTRUCT_DEB //:s5
// // debug ...
Standard_Integer nbp = params->Length();
Standard_Integer nb2 = points2d->Length();
}
catch(Standard_Failure) {
C3d.Nullify();
-#ifdef DEB //:s5
+#ifdef SHAPECONSTRUCT_DEB //:s5
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::InterpolateCurve3d(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if (nbPntDropped == 0)
return;
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning : removing 3d points for interpolation" << endl;
#endif
// Build new HArrays
Standard_Integer newLast = lastElem - nbPntDropped;
if ((newLast - firstElem + 1) < 2) {
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Too many degenerated points for 3D interpolation" << endl;
#endif
return;
if (nbPntDropped == 0)
return;
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Warning : removing 2d points for interpolation" << endl;
#endif
// Build new HArrays
Standard_Integer newLast = lastElem - nbPntDropped;
if ((newLast - firstElem + 1) < 2) {
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Too many degenerated points for 2D interpolation" << endl;
#endif
//pdn 12.02.99 S4135 Creating pcurve with minimal length.
Standard_Integer newCurr = 1;
for (i = firstElem; i <= lastElem ; i++) {
if (tmpParam.Value(i) == 1) {
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Point " << i << " : " << points->Value(i).X() << " " << points->Value(i).Y() << " at param " << params->Value(i) << endl;
#endif
newPnts->SetValue(newCurr, points->Value(i));
newCurr ++;
}
else {
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
cout << "Removed " << i << " : " << points->Value(i).X() << " " << points->Value(i).Y() << " at param " << params->Value(i) << endl;
#endif
}
} // RAJOUT
catch(Standard_Failure) {
// pb : on affiche ce qu on peut
-#ifdef DEBUG
+#ifdef SHAPECONSTRUCT_DEB
for (Standard_Integer numpnt = 1; numpnt <= nbrPnt; numpnt ++) {
cout<<"["<<numpnt<<"]param="<<params(numpnt)<<" point=("<<
points(numpnt).X()<<" "<<points(numpnt).Y()<<" "<<points(numpnt).Z()<<")"<<endl;
}
#endif
-#ifdef DEB //:s5
+#ifdef SHAPECONSTRUCT_DEB //:s5
cout << "Warning: ShapeConstruct_ProjectCurveOnSurface::IsAnIsoparametric(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if(ConvertCurve(BasCurve,ResCurve,Standard_False,Max(VF,BasCurve->FirstParameter()),Min(VL,BasCurve->LastParameter()),TolS,Standard_False)) {
Handle(Geom_SurfaceOfRevolution) newRevol = new Geom_SurfaceOfRevolution(ResCurve,Surface->Axis());
aSurf = newRevol;
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout <<" Revolution on offset converted" << endl;
#endif
}
if (anApprox.MaxError() <= myTol3d && Done) {
nbOfSpan = (anApprox.Surface()->NbUKnots()-1)*(anApprox.Surface()->NbVKnots()-1);
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
if((imax-i+1)!=1) {
cout << " iteration = " << i
<< "\terror = " << anApprox.MaxError()
return Standard_True;
}
else {
- //#ifdef DEB
- // cout<< " iteration = " << imax-i+1
- // << "\terror = " << anApprox.MaxError() <<endl;
- //#endif
break;
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Warning: GeomConvert_ApproxSurface Exception: try to decrease continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
else continue;
}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
#endif
return Standard_False;
if(MaxDeg < myParameters->GMaxDegree())
{ MaxDeg = myParameters->GMaxDegree(); continue;}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout<<" Approximation iteration out. Surface is not aproximated." << endl;
#endif
return Standard_False;
(anApprox.MaxError() >= Max(TolCur,myTol3d)))) {
if(MaxSeg < myParameters->GMaxSeg()) { MaxSeg = myParameters->GMaxSeg(); aC =aC1; continue;}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
MaxDeg = myParameters->GMaxDegree(); aC = aC1; continue;
}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Warning: GeomConvert_ApproxCurve Exception: Wrong Coefficient : Decrease continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if(myDeg && ((DegC > MaxDeg) || !Done || ( anApprox.MaxError() >= Max(myTol2d,TolCur)))) {
if(MaxSeg < myParameters->GMaxSeg()) { MaxSeg = myParameters->GMaxSeg(); aC =aC1; continue;}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
MaxDeg = myParameters->GMaxDegree(); aC =aC1; continue;
}
else {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Curve is not aproxed with continuity "<< aCont<<endl;
#endif
if(IsConvert) {
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPECUSTOM_DEB
cout << "Warning: Geom2dConvert_ApproxCurve Exception: Wrong Cofficient :Decrease Continuity ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
converted = Standard_True;
}
}
-#ifdef DEBUG
+#ifdef SHAPECUSTOM_DEB
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
#endif
if ( ! converted ) return newCurve;
// CKY 3-FEV-1997 : verification du sens de description
//gp_Dir AXY = aAx3.YDirection(); // AXY not used (skl)
if (aAx3.YDirection().Dot (origD1U) < 0) {
-#ifdef DEBUG
+#ifdef SHAPECUSTOM_DEB
cout<<" Surface Analytique : sens a inverser"<<endl;
#endif
aAx3.YReverse(); // mais X reste !
new Geom_ToroidalSurface(aAx3, RR1, RR2);
if (j==2) anObject->UReverse();
anObject->D1 (0.,0.,resPnt,resD1U,resD1V);
-#ifdef DEBUG
+#ifdef SHAPECUSTOM_DEB
if (resD1U.Dot(origD1U) < 0 && j != 2)
cout<<" Tore a inverser !"<<endl;
#endif
}
}
-#ifdef DEBUG
+#ifdef SHAPECUSTOM_DEB
cout << "Warning: ShapeCustom_Surface: Closed BSplineSurface is caused to be periodic" << endl;
#endif
if ( ! converted ) return newSurf;
ok &= Curve (i)->Value (Curve(i)->LastParameter()).IsEqual
(Curve (i + 1)->Value (Curve(i + 1)->FirstParameter()), Preci);
}
-#ifdef DEB
+#ifdef SHAPEEXTEND_DEB
if (!ok) cout << "Warning: ShapeExtend_ComplexCurve: not connected in 3d" << endl;
#endif
return ok;
if ( ! SetUJointValues ( UJoints ) || ! SetVJointValues ( VJoints ) ) {
ok = Standard_False;
ComputeJointValues ( ShapeExtend_Natural );
-#ifdef DEB
+#ifdef SHAPEEXTEND_DEB
cout << "Warning: ShapeExtend_CompositeSurface::Init: bad joint values" << endl;
#endif
}
else if ( maxdist2 > Prec*Prec ) ok = Standard_False;
}
-#ifdef DEB
+#ifdef SHAPEEXTEND_DEB
if ( ! ok ) cout << "Warning: ShapeExtend_CompositeSurface: not connected in 3d" << endl;
#endif
return ok;
const Message_Gravity)
{
if (object.IsNull()) {
-#ifdef DEB
+#ifdef SHAPEEXTEND_DEB
cout << "Warning: ShapeExtend_MsgRegistrator::Send: null object" << endl;
#endif
return;
const Message_Gravity)
{
if (shape.IsNull()) {
-#ifdef DEB
+#ifdef SHAPEEXTEND_DEB
cout << "Warning: ShapeExtend_MsgRegistrator::Send: null shape" << endl;
#endif
return;
}
if (!status) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"** SameParameter not complete. On "<<numedge<<" Edges:";
if (nbfail > 0) cout<<" "<<nbfail<<" Failed";
cout<<endl;
BRepLib::EncodeRegularity ( S, tolang );
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: Exception in ShapeFix::EncodeRegularity(): ";
Standard_Failure::Caught()->Print ( cout );
cout << endl;
for ( TopoDS_Iterator it(res); it.More(); it.Next() ) {
TopoDS_Edge E = TopoDS::Edge ( it.Value() );
if ( ! E.IsNull() ) segw->Add ( E );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
else cout << "Error: ShapeFix_ComposeShell, ApplyContext: wrong mapping of edge" << endl;
#endif
}
else wire.AddEdge ( index, aE, iumin, iumax, ivmin, ivmax );
}
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
else cout << "Warning: ShapeFix_ComposeShell, ApplyContext: edge is to remove - not implemented" << endl;
#endif
else if ( code == IOR_BOTH ) { // parity error in intersector
code = IOR_LEFT;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_ComposeShell::ComputeCode: lost intersection point" << endl;
#endif
}
if ( nsplit !=1 ) {
DistributeSplitPoints ( wire.WireData(), myFace, i, nsplit, indexes, values );
if ( nsplit <=0 ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Error: ShapeFix_ComposeShell::SplitWire: edge dismissed" << endl;
#endif
i--;
}
if ( tanglevel <0 ) {
// myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL4 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_ComposeShell::SplitByLine: tangency level <0 !" << endl;
#endif
}
// protection against creating null-length edges
if ( SplitLinePar(i) - SplitLinePar(i-1) < ::Precision::PConfusion() ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Info: ShapeFix_ComposeShell::SplitByLine: Short segment ignored" << endl;
#endif
if ( ! V1.IsSame ( V2 ) ) { // merge coincident vertices
Context()->Replace ( V1, V.Oriented ( V1.Orientation() ) );
Context()->Replace ( V2, V.Oriented ( V2.Orientation() ) );
V1 = V2 = V;
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Info: ShapeFix_ComposeShell::SplitByLine: Coincided vertices merged" << endl;
#endif
}
}
if ( parity % 2 ) {
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL4 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Error: ShapeFix_ComposeShell::SplitByLine: parity error" << endl;
#endif
}
i--;
continue;
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
for ( Standard_Integer k=1; ! myClosedMode && k <= seqw(i).NbEdges(); k++ )
- if ( ! seqw(i).CheckPatchIndex ( k ) ) {;} //break;
-// cout << "Warning: ShapeFix_ComposeShell::CollectWires: Wrong patch indices" << endl;
+ if ( ! seqw(i).CheckPatchIndex ( k ) ) {
+ cout << "Warning: ShapeFix_ComposeShell::CollectWires: Wrong patch indices" << endl;
+ break;
+ }
#endif
Standard_Integer isshort = IsShortSegment ( seqw(i), myFace, myGrid, myLoc,
myUResolution, myVResolution );
( seqw(i).Orientation() == TopAbs_EXTERNAL ||
( seqw(i).NbEdges() == 1 && //:abv 13.05.02: OCC320 - remove if degenerated
BRep_Tool::Degenerated ( seqw(i).Edge(1) ) ) ) ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Info: ShapeFix_ComposeShell::CollectWires: Short segment ignored" << endl;
#endif
seqw(i).Orientation ( TopAbs_INTERNAL );
IsCoincided ( endPnt, firstPnt, myUResolution, myVResolution, 2.* tol ) ) ) {
if ( ! endV.IsSame ( sae.FirstVertex ( firstEdge ) ) ) {
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_ComposeShell::CollectWires: can't close wire" << endl;
#endif
}
//pdn add into resulting sequence!
ShapeFix_WireSegment s ( wd, TopAbs_FORWARD );
wires.Append ( s );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout <<"Warning: Short segment processed as separate wire"<<endl;
#endif
continue;
// check for lost wires, and if they are, make them roots
if ( roots.Length() <=0 && loops.Length() >0 ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl;
#endif
for ( Standard_Integer j=1; j <= loops.Length(); j++ ) {
BRepTopAdaptor_FClass2d clas ( fc, ::Precision::PConfusion() );
if ( clas.PerformInfinitePoint() == TopAbs_IN ) {
reverse = Standard_True;
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_ComposeShell::MakeFacesOnPatch: badly oriented wire" << endl;
#endif
}
// check for lost wires, and if they are, make them roots
if ( i == roots.Length() && loops.Length() >0 ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl;
#endif
for ( j=1; j <= loops.Length(); j++ ) {
}
*/
// Other case not yet implemented
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout << "TranslatePCurve not performed" << endl;
#endif
return theNewL2d;//*theL2d;
Handle(Geom2d_BSplineCurve)
aBC = Handle(Geom2d_BSplineCurve)::DownCast(aC2d);
if (aBC.IsNull()) {
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout << "Untreated curve type in TranslatePCurve" << endl;
#endif
return aC2d;
}
*/
else if (theVector.IsParallel(VectIsoVF, aTol)) {
-//#ifdef DEBUG
-// cout << "other curve-VClosed Surface. TranslatePC not impl." << endl;
-//#endif
if (Abs(FirstPoint.Y() - vf) < Abs(FirstPoint.Y() - vl)) T.SetTranslation(p00, p01);
else T.SetTranslation(p01, p00);
newC->Transform(T);
} // end try
catch(Standard_Failure) {
myStatus |= ShapeExtend::EncodeStatus (ShapeExtend_FAIL2);
-#ifdef DEB //:s5
+#ifdef SHAPEFIX_DEB //:s5
cout << "Warning: ShapeFix_Edge::FixAddPCurve(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "\nWarning: ShapeFix_Edge: Exception in SameParameter: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
Standard_Real U1 = FirstParam();
Standard_Real U2 = LastParam();
if (U1>=U2) {
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout << "Parametres inverses ... " << endl;
#endif
Standard_Real tmp = U1;
else return Standard_False;
} // end try
catch(Standard_Failure) {
-#ifdef DEB //:s5
+#ifdef SHAPEFIX_DEB //:s5
cout << "Warning: ShapeFix_EdgeProjAux, FindParameterWithExt(): Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
return;
}
}
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
else cout <<"Other type of deg curve"<<endl;
#endif
cf=-10000;
cl= 10000;
//pdn not cutted by bounds
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Infinite Surface"<<endl;
#endif
}
//pdn not linear case not managed
cf=-10000;
cl= 10000;
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Some infinite curve"<<endl;
#endif
}
myFirstParam = theCurve2d->ReversedParameter(Usup);
myLastParam = theCurve2d->ReversedParameter(Uinf);
theCurve2d->Reverse();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_EdgeProjAux: pcurve reversed" << endl;
#endif
return;
UpdateParam2d(theCurve2d);
else {
myLastParam+=period;
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout <<" Added"<<endl;
#endif
}
if(w1 > wmid) {
myLastParam -=period;
UpdateParam2d(theCurve2d);
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout <<" Added & Inverted"<<endl;
#endif
} else if (w2 < wmid) {
if ( Abs ( myFirstParam - cl ) <= preci2d ) myFirstParam = cf;
else if ( Abs ( myLastParam - cf ) <= preci2d ) myLastParam = cl;
else {
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout << "Error : curve 2d range crossing non periodic curve origin";
cout << endl;
#endif
}
}
else {
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout << "Warning : non increasing parameters for 2d curve." << endl;
cout << " update parameter 2d uncertain." << endl;
#endif
}
if(aResWires.Length()>1) {
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Wire was splitted on "<<aResWires.Length()<<" wires"<< endl;
#endif
}
BRepTools::Update(myFace);
/**/
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Natural bound on sphere or torus with holes added"<<endl; // mise au point !
#endif
SendWarning ( myFace, Message_Msg ( "FixAdvFace.FixOrientation.MSG0" ) );// Face created with natural bounds
ws.SetValue ( 1, sbdw->Wire() );
SendWarning ( sbdw->Wire(), Message_Msg ( "FixAdvFace.FixOrientation.MSG5" ) );// Wire on face was reversed
done = Standard_True;
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Wire reversed"<<endl; // mise au point !
#endif
}
Standard_Integer k =1;
for( ; k <= aSeqReversed.Length(); k++ )
{
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Wire no "<<aSeqReversed.Value(k)<<" of "<<nb<<" reversed"<<endl; // mise au point !
#endif
}
}
else {
w2.Reverse();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
if ( ! isdeg2 ) cout << "Warning: ShapeFix_Face::FixMissingSeam(): wire reversed" << endl;
#endif
}
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
else cout << "Warning: ShapeFix_Face::FixMissingSeam(): incompatible open wires" << endl;
#endif
}
// else return Standard_False; // abort
else {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Face::FixMissingSeam(): more than two open wires detected!" << endl;
#endif
//:abv 30.08.09: if more than one open wires and more than two of them are
w1.Nullify();
w2.Nullify();
i = 0;
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Face::FixMissingSeam(): open degenerated wire removed" << endl;
#endif
continue;
if ( nbRemoved <=0 ) return Standard_False;
if ( nbWires <=0 ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Face: All wires on a face have small area; left untouched" << endl;
#endif
return Standard_False;
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Face: " << nbRemoved << " small area wire(s) removed" << endl;
#endif
if ( ! Context().IsNull() ) Context()->Replace ( myFace, face );
Standard_Boolean isDone =(aResWires.Length() && isClosed);
if(isDone && aResWires.Length() >1)
{
-#ifdef DEBUG
+#ifdef SHAPEFIX_DEB
cout<<"Wire was splitted on "<<aResWires.Length()<<" wires"<< endl;
#endif
}
// Clear the temporary map of free edges
theFreeEdges.Clear();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
//-------------------------------
//szv debug - preparation results
//-------------------------------
// Process second face for the pair of different faces only
if (theFirstFace.IsSame(theSecondFace)) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Warning: ShapeFix_FaceConnect::Build: Self-connected face"<<endl;
#endif
}
// Clear the temporary map of processed faces
theProcessed.Clear();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
//-------------------------------
//szv debug - sewing results
//-------------------------------
TopoDS_Shape tmpReShape = theReShape->Apply(result);
result = TopoDS::Shell(tmpReShape);
if (theReShape->Status(ShapeExtend_OK)) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Warning: ShapeFix_FaceConnect::Build: Edges not replaced by ReShape"<<endl;
#endif
}
else if (theReShape->Status(ShapeExtend_FAIL1)) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Error: ShapeFix_FaceConnect::Build: ReShape failed on edges"<<endl;
#endif
}
result = TopoDS::Shell(tmpshape);
if (theReShape->Status(ShapeExtend_FAIL1)) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Error: ShapeFix_FaceConnect::Build: ReShape failed on vertices"<<endl;
#endif
}
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
//-------------------------------
//szv debug - reshape results
//-------------------------------
}
else {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "The face is not strip face" << endl;
#endif
return theNewEdge;
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
infinstatus = bsc3d.State();
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Solid::SolidFromShell: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
if ( seq.Length() >0 ) { // supposed that edge is SP
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Edge going over singularity detected; splitted" << endl;
#endif
Standard_Boolean isFwd = ( E.Orientation() == TopAbs_FORWARD );
myFixEdge->Projector()->AdjustOverDegenMode() = Standard_False;
myFixEdge->FixAddPCurve ( sbwd->Edge(overdegen), face, sbwd->IsSeam(overdegen), myAnalyzer->Surface(), Precision());
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Edge going over singularity detected; pcurve adjusted" << endl;
#endif
}
myStatusSelfIntersection |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
num = ( myClosedMode ? 1 : 2 );
nb = sbwd->NbEdges();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire::FixSelfIntersection: Edge removed" << endl;
#endif
}
if ( ! Context().IsNull() ) UpdateWire();
myShape.Nullify();
}
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
if (StatusSelfIntersection (ShapeExtend_DONE5))
cout<<"Warning: ShapeFix_Wire::FixIntersection: Non-adjacent intersection fixed (split-"
<<NbSplit<<", cut-"<<NbCut<<", removed-"<<NbRemoved<<")"<<endl;
vclosed = Standard_True;
VRange = aBaseCrv->Period();
IsVCrvClosed = Standard_True;
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire::FixShifted set vclosed True for Surface of Revolution" << endl;
#endif
}
UpdateEdgeUVPoints ( edge, Face() );
}
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE1 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Info: ShapeFix_Wire::FixShifted(): bi - meridian case fixed" << endl;
#endif
continue;
if ( ! sae.PCurve ( E, face, c2d, a, b, Standard_False ) )
return Standard_False;
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Cut Loop: params (" << t1 << ", " << t2;
#endif
GeomAdaptor_Curve GAC ( crv, f, l );
Standard_Real dt = tolfact * GAC.Resolution(prec);
t1 -= dt; //1e-3;//::Precision::PConfusion();
t2 += dt; //1e-3;//::Precision::PConfusion();
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << ") -> (" << t1 << ", " << t2 << ")" << endl;
#endif
if ( ! TryNewPCurve ( E, face, bs, a, b, newtol ) ) return Standard_False;
Standard_Real tol = BRep_Tool::Tolerance ( E );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Cut Loop: tol orig " << tol << ", prec " << prec << ", new tol " << newtol << endl;
#endif
if ( newtol > Max ( prec, tol ) ) return Standard_False;
TopoDS_Edge &E1,
TopoDS_Edge &E2)
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Info: ShapeFix_Wire::FixSelfIntersection : Try insert vertex"<<endl;
#endif
Standard_Real maxte = Max ( te1, te2 );
if ( maxte < MaxTolerance() && maxte < newtol ) {
if ( BRep_Tool::Tolerance(E1) < te1 || BRep_Tool::Tolerance(E2) < te2 ) {
-//#ifdef DEB
-// cout << "Warning: ShapeFix_Wire::FixIE: edges tolerance increased: (" <<
-// te1 << ", " << te2 << ") / " << newtol << endl;
-//#endif
B.UpdateEdge ( E1, 1.000001 * te1 );
B.UpdateVertex ( sae.FirstVertex ( E1 ), 1.000001 * te1 );
B.UpdateVertex ( sae.LastVertex ( E1 ), 1.000001 * te1 );
c2d = bs;
}
catch ( Standard_Failure ) {
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire::FixLacking: Exception in Geom2d_BSplineCurve::Segment()" << endl;
#endif
return Standard_False;
// insert new edge
if ( doAddDegen ) {
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire::FixLacking: degenerated edge added" << endl;
#endif
}
FixSelfIntersectingEdge ( n1 );
FixSelfIntersectingEdge ( n2 );
FixIntersectingEdges ( n2 ); //skl 24.04.2003 for OCC58
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Info: ShapeFix_Wire::FixLacking: Bending pcurves" << endl;
#endif
myLastFixStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
const Standard_Integer iumin)
{
if ( myIUMin->Value(i) < iumin ) myIUMin->SetValue ( i, iumin );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
if ( myIUMin->Value(i) > myIUMax->Value(i) )
cout << "Warning: ShapeFix_WireSegment::DefineIUMin: indexation error" << endl;
#endif
const Standard_Integer iumax)
{
if ( myIUMax->Value(i) > iumax ) myIUMax->SetValue ( i, iumax );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
Standard_Integer iun = myIUMin->Value(i), iux = myIUMax->Value(i);
if ( iun > iux )
cout << "Warning: ShapeFix_WireSegment::DefineIUMax: indexation error" << endl;
const Standard_Integer ivmin)
{
if ( myIVMin->Value(i) < ivmin ) myIVMin->SetValue ( i, ivmin );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i);
if ( ivn > ivx )
cout << "Warning: ShapeFix_WireSegment::DefineIVMin: indexation error" << endl;
const Standard_Integer ivmax)
{
if ( myIVMax->Value(i) > ivmax ) myIVMax->SetValue ( i, ivmax );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i);
if ( ivn > ivx )
cout << "Warning: ShapeFix_WireSegment::DefineIVMax: indexation error" << endl;
Standard_Integer dU = myIUMax->Value(i) - myIUMin->Value(i);
Standard_Integer dV = myIVMax->Value(i) - myIVMin->Value(i);
Standard_Boolean ok = ( dU ==0 || dU ==1 ) && ( dV ==0 || dV ==1 );
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
if ( ! ok )
cout << "Warning: ShapeFix_WireSegment::CheckPatchIndex: incomplete indexation" << endl;
#endif
}
catch (Standard_Failure)
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve" <<first<<" " <<last<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
catch (Standard_Failure)
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire_1::FixGap3d: Exception in TrimmedCurve :"<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
catch (Standard_Failure)
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d" <<first<<" " <<last<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
catch (Standard_Failure)
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout << "Warning: ShapeFix_Wire_1::FixGap2d: Exception in TrimmedCurve2d :"<<endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
catch ( Standard_Failure )
{
-#ifdef DEB
+#ifdef SHAPEFIX_DEB
cout<<"Error: ShapeFix_Wireframe::FixSmallEdges: JoinEdges: Exception in GeomConvert_CompCurveToBSplineCurve: ";
Standard_Failure::Caught()->Print(cout); cout<<endl;
#endif
{
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
if ( dic->HasItem ( name, Standard_True ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: operator with name " << name << " is already registered!" << endl;
#endif
return Standard_False;
{
if ( dic.IsNull() ) dic = new ShapeProcess_DictionaryOfOperator;
if ( ! dic->HasItem ( name, Standard_True ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Error: no operator with name " << name << " registered!" << endl;
#endif
return Standard_False;
// get description of the sequence
TCollection_AsciiString sequence;
if ( ! context->GetString ( "exec.op", sequence ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Error: ShapeProcess_Performer::Perform: sequence not defined for " << seq << endl;
#endif
context->UnSetScope();
}
}
if ( sRC.IsNull() ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Info: ShapeProcess_Context: Reload Resource_Manager: "
<< name.ToCString() << " -> " << file << endl;
#endif
if ( myRC.IsNull() ) return Standard_False;
Handle(TCollection_HAsciiString) pname = MakeName ( myScope, param );
if ( ! myRC->Find ( pname->ToCString() ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << pname->ToCString() << " is not defined" << endl;
#endif
return Standard_False;
ref.LeftAdjust();
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
#endif
return Standard_False;
return Standard_True;
}
}
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Real nor reference to Real";
#endif
return Standard_False;
ref.LeftAdjust();
ref.RightAdjust();
if ( ! myRC->Find ( ref.ToCString() ) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << ref.ToCString() << " is not defined" << endl;
#endif
return Standard_False;
return Standard_True;
}
}
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): Parameter " << param << " is neither Integer nor reference to Integer";
#endif
return Standard_False;
return Standard_True;
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
return myRC->Value ( MakeName ( myScope, param )->ToCString() );
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout << "Warning: ShapeProcess_Context::GetInteger(): " << param << ": ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
SDA.SetMaxTolerance ( ctx->RealVal ( "MaxTolerance", 1. ) );
if ( ! SDA.Perform() && SDA.Status (ShapeExtend_FAIL) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout<<"ShapeDivideAngle failed"<<endl;
#endif
return Standard_False;
if ( ctx->GetBoolean ( "EdgeMode", EdgeMode ) ) SCB.SetEdgeMode(EdgeMode);
if ( ! SCB.Perform() && SCB.Status (ShapeExtend_FAIL) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout<<"Shape::ShapeConvertToBezier failed"<<endl; // !!!!
#endif
return Standard_False;
if ( ctx->GetReal ( "MaxTolerance", maxTol ) ) tool.SetMaxTolerance(maxTol);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout<<"SplitContinuity failed"<<endl;
#endif
return Standard_False;
tool.SetNbSplitPoints(num);
tool.SetSurfaceSegmentMode(hasSeg);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout<<"Splitting of closed faces failed"<<endl;
#endif
return Standard_False;
tool.SetNbSplitPoints(nbSplits);
if ( ! tool.Perform() && tool.Status (ShapeExtend_FAIL) ) {
-#ifdef DEB
+#ifdef SHAPEPROCESS_DEB
cout<<"Splitting of closed edges failed"<<endl;
#endif
return Standard_False;
split->Append(val);
isUSplit = Standard_True;
}
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
#endif
}
split->Append(val);
isUSplit = Standard_False;
}
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
else cout << "Warning: SU_ClosedFaceDivide: Thin face, not splitted" << endl;
#endif
}
if(Abs(Last-bl) < precision)
Last = bl;
if(First < bf){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
#endif
First = bf;
mySplitValues->SetValue(1,First);
}
if(Last > bl){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the pcurve domain" <<endl;
#endif
Last = bl;
if(Abs(Last-bl) < precision)
Last = bl;
if(First < bf){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
First = bf;
mySplitValues->SetValue(1,First);
}
if(Last > bl){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
Last = bl;
else
VFilteredJoints.Append(VJoints(i));
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
if(NbVFiltered || NbUFiltered)
cout<<"Warning: ShapeUpgrade_ConvertSurfaceToBezierBasis: thin patches dropped."<<endl;
#endif
bezier->Segment(V1,V2);
}
else {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: Resulting path is not surface of revolution basis on bezier curve"<<endl;
#endif
}
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_FixSmallBezierCurve::Approx(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
catch (Standard_Failure) {
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL2 );
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "\nError: Exception in ShapeUpgrade_FaceDivide::Perform(): ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
if(Abs(lastPar-lP) < precision)
lastPar = lP;
if(firstPar < fP){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
firstPar = fP;
}
if(lastPar > lP){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
lastPar = lP;
Handle(Geom2d_BezierCurve)::DownCast(theNewCurve)->Segment (First, Last);
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_Split2dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_SplitCurve2dContinuity: criterion C3 for Offset curve" << endl;
#endif
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
if(Abs(lastPar-lP) < precision)
lastPar = lP;
if(firstPar < fP){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
firstPar = fP;
}
if(lastPar > lP){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
lastPar = lP;
if(Abs(Last-lastPar) < precision)
Last = lastPar;
if(First < firstPar){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
First = firstPar;
mySplitValues->SetValue(1,First);
}
if(Last > lastPar){
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout <<"Warning: The range of the edge exceeds the curve domain" <<endl;
#endif
Last = lastPar;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_Split3dCurve::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
case GeomAbs_C3 : // if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset curve"<<endl;
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_SplitCurve3dContinuity: criterion C3 for Offset curve" << endl;
#endif
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
myStatus |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE3 );
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_SplitSurface::Build(): Exception in Segment :";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
case GeomAbs_C1 : BasCriterion = GeomAbs_C2; break;
case GeomAbs_C2 : BasCriterion = GeomAbs_C3; break;
case GeomAbs_C3 : //if (ShapeUpgrade::Debug()) cout<<". this criterion is not suitable for a Offset Surface"<<endl;;
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Warning: ShapeUpgrade_SplitSurfaceContinuity: criterion C3 for Offset surface" << endl;
#endif
case GeomAbs_CN : BasCriterion = GeomAbs_CN; break;
}
}
if(aChain.Length()<SeqEdges.Length()) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout<<"can not create correct chain..."<<endl;
#endif
return Standard_False;
}
}
if (j < aChain.Length()) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout<<"null curve3d in edge..."<<endl;
#endif
return Standard_False;
break;
}
if(NeedUnion) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout<<"can not make analitical union => make approximation"<<endl;
#endif
TopoDS_Edge E = GlueEdgesWithPCurves(aChain, VF, VL);
aChain.SetValue(1,E);
}
else {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout<<"can not make approximation for such types of curves"<<endl;
#endif
return Standard_False;
Handle(TColStd_HSequenceOfReal) revKnots2d = theSplit2dTool->SplitValues();
if(revKnots2d->Length()!=theKnots2d->Length()) {
isSeam = Standard_False;
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout << "Error: ShapeUpgrade_WireDivide: seam has different splitting values on pcurvesd" << endl;
#endif
}
if ( !theSegments2d.IsNull() ) {
Standard_Integer nbc2d = theSegments2d->Length();
if (nbc!=nbc2d) {
-#ifdef DEB
+#ifdef SHAPEUPGRADE_DEB
cout<<"Error: Number of intervals are not equal for 2d 3d. Ignored."<<endl;
#endif
nbc = Min( nbc,nbc2d);
{
if ( (Value <= -1.) || (Value >= 1.) ){
Standard_NumericError::Raise("Illegal agument in ATanh");
+#ifdef STANDARD_DEB
cout << "Illegal agument in ATanh" << endl ;
+#endif
}
return atanh(Value);
}
{
if ( Value < 1. ){
Standard_NumericError::Raise("Illegal agument in ACosh");
+#ifdef STANDARD_DEB
cout << "Illegal agument in ACosh" << endl ;
+#endif
}
return acosh(Value);
}
Standard_Real Log (const Standard_Real Value)
{ if ( Value <= 0. ){
Standard_NumericError::Raise("Illegal agument in Log");
+#ifdef STANDARD_DEB
cout << "Illegal agument in Log" << endl ;
+#endif
}
return log(Value);
}
{
if ( Value < 0. ){
Standard_NumericError::Raise("Illegal agument in Sqrt");
+#ifdef STANDARD_DEB
cout << "Illegal agument in Sqrt" << endl ;
+#endif
}
return sqrt(Value);
}
Handle(Standard_Transient) StdDrivers::Factory(const Standard_GUID& aGUID) {
if(aGUID == StdSchemaID) {
-#ifdef DEB
+#ifdef STDDRIVERS_DEB
cout << "StdSchema : Plugin" << endl;
#endif
static Handle(StdLSchema) model_ss = new StdLSchema;
static Standard_Boolean aNeedNested = Standard_True;
if(aNeedNested) {
aNeedNested = Standard_False;
-#ifdef DEB
+#ifdef STDDRIVERS_DEB
cout << "StdSchema: Adding nested schema" << endl;
#endif
Handle(StdSchema) aSchema = new StdSchema;
}
if(aGUID == StdStorageDriver) {
-#ifdef DEB
+#ifdef STDDRIVERS_DEB
cout << "StdDrivers : Storage Plugin" << endl;
#endif
static Handle(StdDrivers_DocumentStorageDriver) model_sd = new StdDrivers_DocumentStorageDriver;
return model_sd;
}
if(aGUID == StdRetrievalDriver) {
-#ifdef DEB
+#ifdef STDDRIVERS_DEB
cout << "StdDrivers : Retrieval Plugin" << endl;
#endif
static Handle(StdDrivers_DocumentRetrievalDriver) model_rd = new StdDrivers_DocumentRetrievalDriver;
Handle(Standard_Transient) StdLDrivers::Factory(const Standard_GUID& aGUID) {
if(aGUID == StdLSchemaID) {
-#ifdef DEB
+#ifdef STDLDRIVERS_DEB
cout << "StdLSchema : Plugin" << endl;
#endif
static Handle(StdLSchema) model_ss = new StdLSchema;
}
if(aGUID == StdLStorageDriver) {
-#ifdef DEB
+#ifdef STDLDRIVERS_DEB
cout << "StdLDrivers : Storage Plugin" << endl;
#endif
static Handle(StdLDrivers_DocumentStorageDriver) model_sd = new StdLDrivers_DocumentStorageDriver;
return model_sd;
}
if(aGUID == StdLRetrievalDriver) {
-#ifdef DEB
+#ifdef STDLDRIVERS_DEB
cout << "StdLDrivers : Retrieval Plugin" << endl;
#endif
static Handle(StdLDrivers_DocumentRetrievalDriver) model_rd = new StdLDrivers_DocumentRetrievalDriver;
}
}
}
+#ifdef STDPRS_DEB
else {
cout << "Cannot evaluate curve on surface"<<endl;
}
+#endif
}
else {
U1 = TheRCurve->FirstParameter();
}
}
}
+#ifdef STDPRS_DEB
else {
cout << "Cannot evaluate curve on surface"<<endl;
}
+#endif
}
}
BRep_Tool::Range (aWireExplorer.Current(), wf, wl);
if (Abs (wf - wl) <= Precision::Confusion())
{
- #ifdef DEB
+ #ifdef STDSELECT_DEB
cout<<" StdSelect_BRepSelectionTool : Curve where ufirst = ulast ...."<<endl;
#endif
}
Standard_Boolean StepAP209_Construct::CreateFeaStructure (const Handle(StepBasic_Product) &Prod) const
{
if(Prod.IsNull()) {
-#ifdef DEB
+#ifdef STEPAP209_DEB
cout<<"Prod.IsNull()"<<endl;
#endif
return Standard_False;
}
Handle(StepShape_ShapeRepresentation) AnaSR = IdealShape(Prod);
if(AnaSR.IsNull()) {
-#ifdef DEB
+#ifdef STEPAP209_DEB
cout<<"AnaSR.IsNull()"<<endl;
#endif
return Standard_False;
{
// WARNING : the field is redefined.
// field set up forbidden.
-#ifdef DEB
+#ifdef STEPBASIC_DEB
cout << "Field is redefined, SetUp Forbidden" << endl;
#endif
}
thescopenext = new TColStd_HArray1OfInteger (1,nb); thescopenext->Init(0);
}
else if (thescopenext->Value(numin) != 0) {
-#ifdef DEB
+#ifdef STEPDATA_DEB
cout << "StepWriter : SetScope (scope : " << numscope << " entity : "
<< numin << "), Entity already in a Scope"<<endl;
#endif
{
if (i == 1) aFMulDiff = aCurrentVal - Deg - 1;
if (i == NbKnots) aLMulDiff = aCurrentVal - Deg - 1;
-#ifdef DEB
+#ifdef STEPTOGEOM_DEB
cout << "\nWrong multiplicity " << aCurrentVal << " on " << i
<< " knot!" << "\nChanged to " << Deg + 1 << endl;
#endif
// force periodicity on closed curves
if ( SC->ClosedCurve() && CC->Degree() >1 && CC->IsClosed() ) {
CC->SetPeriodic();
-//#ifdef DEB
-// cout << "Warning: "__FILE__": Closed curve made periodic" << endl;
-//#endif
}
return Standard_True;
}
return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurve))) {
-//#ifdef DEBUG
-// cout << "Warning : converting UniformCurve onto BSplineCurveWithKnots" << endl;
-//#endif
const Handle(StepGeom_UniformCurve) UC = Handle(StepGeom_UniformCurve)::DownCast(SC);
const Handle(StepGeom_BSplineCurveWithKnots) BSPL = new StepGeom_BSplineCurveWithKnots;
BSPL->SetDegree(UC->Degree());
return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurve))) {
-//#ifdef DEBUG
-// cout << "Warning : converting QuasiUniformCurve onto BSplineCurveWithKnots" << endl;
-//#endif
const Handle(StepGeom_QuasiUniformCurve) QUC =
Handle(StepGeom_QuasiUniformCurve)::DownCast(SC);
const Handle(StepGeom_BSplineCurveWithKnots) BSPL = new StepGeom_BSplineCurveWithKnots;
return StepToGeom_MakeBSplineCurve::Convert(BSPL,*((Handle(Geom_BSplineCurve)*)&CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_UniformCurveAndRationalBSplineCurve))) {
-//#ifdef DEBUG
-// cout << "Warning : converting Rational UniformCurve onto BSplineCurveWithKnots" << endl;
-//#endif
const Handle(StepGeom_UniformCurveAndRationalBSplineCurve) RUC =
Handle(StepGeom_UniformCurveAndRationalBSplineCurve)::DownCast(SC);
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) RBSPL =
return StepToGeom_MakeBSplineCurve::Convert(RBSPL,*((Handle(Geom_BSplineCurve)*)&CC));
}
if (SC->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformCurveAndRationalBSplineCurve))) {
-//#ifdef DEBUG
-// cout << "Warning : converting Rational QuasiUniformCurve onto BSplineCurveWithKnots" << endl;
-//#endif
const Handle(StepGeom_QuasiUniformCurveAndRationalBSplineCurve) RQUC =
Handle(StepGeom_QuasiUniformCurveAndRationalBSplineCurve)::DownCast(SC);
const Handle(StepGeom_BSplineCurveWithKnotsAndRationalBSplineCurve) RBSPL =
return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurface))) {
-//#ifdef DEBUG
-// cout << "Warning : converting UniformSurface onto BSplineSurfaceWithKnots" << endl;
-//#endif
const Handle(StepGeom_UniformSurface) US = Handle(StepGeom_UniformSurface)::DownCast(SS);
const Handle(StepGeom_BSplineSurfaceWithKnots) BSPL = new StepGeom_BSplineSurfaceWithKnots;
BSPL->SetUDegree(US->UDegree());
return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurface))) {
-//#ifdef DEBUG
-// cout << "Warning : converting QuasiUniformSurface onto BSplineSurfaceWithKnots" << endl;
-//#endif
const Handle(StepGeom_QuasiUniformSurface) QUS =
Handle(StepGeom_QuasiUniformSurface)::DownCast(SS);
const Handle(StepGeom_BSplineSurfaceWithKnots) BSPL = new StepGeom_BSplineSurfaceWithKnots;
return StepToGeom_MakeBSplineSurface::Convert(BSPL,*((Handle(Geom_BSplineSurface)*)&CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_UniformSurfaceAndRationalBSplineSurface))) {
-//#ifdef DEBUG
-// cout << "Warning : converting Rational UniformSurface onto BSplineSurfaceWithKnots" << endl;
-//#endif
const Handle(StepGeom_UniformSurfaceAndRationalBSplineSurface) RUS =
Handle(StepGeom_UniformSurfaceAndRationalBSplineSurface)::DownCast(SS);
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) RBSPL =
return StepToGeom_MakeBSplineSurface::Convert(RBSPL,*((Handle(Geom_BSplineSurface)*)&CS));
}
if (SS->IsKind(STANDARD_TYPE(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface))) {
-//#ifdef DEBUG
-// cout << "Warning : converting Rational QuasiUniformSurface onto BSplineSurfaceWithKnots" << endl;
-//#endif
const Handle(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface) RQUS =
Handle(StepGeom_QuasiUniformSurfaceAndRationalBSplineSurface)::DownCast(SS);
const Handle(StepGeom_BSplineSurfaceWithKnotsAndRationalBSplineSurface) RBSPL =
{
// sln 01.10.2001 BUC61003. If entry shell is NULL do nothing
if(SS.IsNull()) {
-//#ifdef DEB
-// cout<<"Warning: StepToGeom_MakeSurface: Null Surface:";
-//#endif
return Standard_False;
}
}
catch(Standard_Failure) {
// ShapeTool_DB ?
-#ifdef DEB //:s5
+#ifdef STEPTOGEOM_DEB //:s5
cout<<"Warning: StepToGeom_MakeSurface: Exception:";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
else {
-//#ifdef DEBUG
-// cout << "Trimming Failed" << endl;
-//#endif
return Standard_False;
}
}
CC = Geom2dConvert::CurveToBSplineCurve(theTrimmed);
return Standard_True;
}
-//#ifdef DEB
-// else cout << "Warning: TrimmedCurve2d not translated" << endl;
-//#endif
return Standard_False;
}
if (theCurve->IsKind(STANDARD_TYPE(Geom_BoundedCurve)) && !theCurve->IsClosed()) {
if (w1 < cf) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Update Edge First Parameter to Curve First Parameter" << endl;
#endif
w1 = cf;
}
else if (w1 > cl) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Update Edge First Parameter to Curve Last Parameter" << endl;
#endif
w1 = cl;
}
if (w2 < cf) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Update Edge Last Parameter to Curve First Parameter" << endl;
#endif
w2 = cf;
}
else if (w2 > cl) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Update Edge Last Parameter to Curve Last Parameter" << endl;
#endif
w2 = cl;
if ( theCurve->Value(w1).Distance(theCurve->Value(cf)) < preci ) w1 = cf;
if ( theCurve->Value(w2).Distance(theCurve->Value(cl)) < preci ) w2 = cl;
if ( w1 > w2 ) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = w1;
// illegal sur une courbe fermee non periodique
// on inverse quand meme les parametres !!!!!!
else {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Warning : parameter range of edge crossing non periodic curve origin" << endl;
#endif
Standard_Real tmp = w1;
}
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
else if ( w1 > w2 ) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
w1 = theCurve->ReversedParameter ( w1 );
}
}
else {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "UpdateParam3d Failed" << endl;
cout << " - Curve Type : " << theCurve->DynamicType() << endl;
cout << " - Param 1 : " << w1 << endl;
#endif
//abv 15.03.00 #72 bm1_pe_t4 protection of exceptions in draw
if ( w1 > w2 ) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Warning: parameter range is bad; curve reversed" << endl;
#endif
w1 = theCurve->ReversedParameter ( w1 );
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef STEPTOTOPODS_DEB
cout << "Warning: StepToTopoDS_TranslateCompositeCurve: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
}
}
catch(Standard_Failure) {
-#ifdef DEB
+#ifdef STEPTOTOPODS_DEB
cout << "Warning: StepToTopoDS_TranslateCompositeCurve: Exception: ";
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
// (TP,tobind, MakeEdge(myCurve,V1,V2,U1,U2,BRepAPI::Precision()) );
// aTool.Bind (tobind,E); SURTOUT PAS : noter pour debug/erreur
// }
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "------------------------------------" << endl;
cout << "MakeEdge Error : " << ME.Error()<<" - ";
#endif
TP->AddFail(orig," Line through identic Points");
break;
}
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Original Type : " << orig->DynamicType() << endl;
cout << "3D Curve Type : " << myCurve->DynamicType() << endl;
cout << "First Parameter : " << U1 << endl;
if (w1 == w2) {
RemoveSinglePCurve(myEdge,aFace);
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout<<"Removing pcuve w1=w2"<<endl;
#endif
continue;
Standard_Boolean ThereIsLikeSeam = Standard_False;
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << " Processing Edge :" << j << endl;
#endif
}
else {
RemoveSinglePCurve(edge, Face);
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout <<"Removing after prj"<<endl;
#endif
}
for (Standard_Integer i = 1; i <= NbBnd; i ++) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << " Processing Wire : " << i << endl;
#endif
FaceBound = FS->BoundsValue(i);
else {
// Type not yet implemented or non sens
TP->AddFail(Loop," Type of loop not yet implemented");
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << Loop->DynamicType() << endl;
#endif
continue;
Message_ProgressSentry PS ( TP->GetProgress(), "Face", 0, NbFc, 1 );
for (Standard_Integer i=1; i<=NbFc && PS.More(); i++, PS.Next()) {
-#ifdef DEBUG
+#ifdef STEPTOTOPODS_DEB
cout << "Processing Face : " << i << endl;
#endif
StepFace = CFS->CfsFacesValue(i);
}
catch(Standard_Failure)
{
-#ifdef DEB
+#ifdef STLTRANSFER_DEB
cout << "Fail in StlTransfer::BuildIncrementalMesh" << endl;
#endif
}
time_t nowbin;
struct tm *nowstruct;
if (time(&nowbin) == (time_t)-1)
+ {
+#ifdef STORAGE_DEB
cerr << "Storage ERROR : Could not get time of day from time()" << endl;
+#endif
+ }
nowstruct = localtime(&nowbin);
if (strftime(nowstr, SLENGTH, "%m/%d/%Y", nowstruct) == (size_t) 0)
+ {
+#ifdef STORAGE_DEB
cerr << "Storage ERROR : Could not get string from strftime()" << endl;
+#endif
+ }
TCollection_AsciiString t(nowstr);
return t;
}
//=======================================================================
-#ifdef DEB
+#ifdef TDF_DEB
static void PrintEntry(const TDF_Label& label, const Standard_Boolean allLevels)
{
TCollection_AsciiString entry;
!TDF_Tool::IsSelfContained(mySL)) return;
#endif
else {
-#ifdef DEB
+#ifdef TDF_DEB
cout << "THE SAME Data" <<endl;
#endif
}
for (TDF_MapIteratorOfAttributeMap attMItr(myMapOfExt);attMItr.More(); attMItr.Next()) {
Handle(TDF_Attribute) att = attMItr.Key();
myRT->SetRelocation(att, att);
-#ifdef DEB
+#ifdef TDF_DEB
PrintEntry(att->Label(), Standard_True);
#endif
}
}
if (!noDeadLock) {
-#ifdef DEB
+#ifdef TDF_DEB
if (before) cout<<"Before"; else cout<<"After";
cout<<"Undo(): dead lock between these attributes:"<<endl;
for (itr.Initialize(ADlist); itr.More(); itr.Next()) {
// Undo = Resume.
Label().ResumeAttribute(Attribute());
Attribute()->mySavedTransaction = 0;
-#ifdef DEB
+#ifdef TDF_DEB
cout<<"Resume attribute"<<endl;
#endif
}
{
// Undo = Forget.
Label().ForgetAttribute (Attribute());
-#ifdef DEB
+#ifdef TDF_DEB
cout<<"Forget attribute"<<endl;
#endif
}
}
}
OldAtt->RemoveArray();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(OldAtt->InternalArray().IsNull())
cout << "BackUp Arr is Nullified" << endl;
#endif
Handle(TDF_Attribute) TDFAttribute = Attribute();
Handle(TDataStd_ByteArray) BackAtt = (*((Handle(TDataStd_ByteArray)*)&TDFAttribute));
if(BackAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfByteArray::Apply: OldAtt is Null" <<endl;
#endif
return;
}
if(aCurAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfByteArray::Apply: CurAtt is Null" <<endl;
#endif
return;
byteArr->SetValue(i, BArr->Value(i));
if(!myIndxes.IsNull() && !myValues.IsNull())
for(i = 1; i <= myIndxes->Upper();i++) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "i = " << i << " myIndxes->Upper = " << myIndxes->Upper() << endl;
cout << "myIndxes->Value(i) = " << myIndxes->Value(i) << endl;
cout << "myValues->Value(i) = " << myValues->Value(i) << endl;
aCurAtt->myValue = byteArr;
}
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << " << Array Dump after Delta Apply >>" <<endl;
Handle(TColStd_HArray1OfByte) BArr2 = aCurAtt->InternalArray();
for(i=BArr2->Lower(); i<=BArr2->Upper() && i<= MAXUP;i++)
Handle(TColStd_HArray1OfExtendedString) Arr1, Arr2;
Arr1 = OldAtt->Array();
Arr2 = CurrAtt->Array();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(Arr1.IsNull())
cout <<"DeltaOnModificationOfExtStringArray:: Old IntArray is Null" <<endl;
if(Arr2.IsNull())
}
}
OldAtt->RemoveArray();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(OldAtt->Array().IsNull())
cout << "BackUp Arr is Nullified" << endl;
#endif
Handle(TDF_Attribute) TDFAttribute = Attribute();
Handle(TDataStd_ExtStringArray) BackAtt = (*((Handle(TDataStd_ExtStringArray)*)&TDFAttribute));
if(BackAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfExtStringArray::Apply: OldAtt is Null" <<endl;
#endif
return;
}
if(aCurAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfExtStringArray::Apply: CurAtt is Null" <<endl;
#endif
return;
strArr->SetValue(i, aStrArr->Value(i));
if(!myIndxes.IsNull() && !myValues.IsNull())
for(i = 1; i <= myIndxes->Upper();i++) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "i = " << i << " myIndxes->Upper = " << myIndxes->Upper() << endl;
cout << "myIndxes->Value(i) = " << myIndxes->Value(i) << endl;
cout << "myValues->Value(i) = " << myValues->Value(i) << endl;
}
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << " << Array Dump after Delta Apply >>" <<endl;
Handle(TColStd_HArray1OfExtendedString) aStrArr2 = aCurAtt->Array();
for(i=aStrArr2->Lower(); i<= aStrArr2->Upper() && i<= MAXUP;i++)
Handle(TColStd_HArray1OfInteger) Arr1, Arr2;
Arr1 = OldAtt->Array();
Arr2 = CurrAtt->Array();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(Arr1.IsNull())
cout <<"DeltaOnModificationOfIntArray:: Old IntArray is Null" <<endl;
if(Arr2.IsNull())
}
}
OldAtt->RemoveArray();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(OldAtt->Array().IsNull())
cout << "BackUp Arr is Nullified" << endl;
#endif
Handle(TDF_Attribute) TDFAttribute = Attribute();
Handle(TDataStd_IntegerArray) BackAtt = (*((Handle(TDataStd_IntegerArray)*)&TDFAttribute));
if(BackAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfIntArray::Apply: OldAtt is Null" <<endl;
#endif
return;
}
if(aCurAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfIntArray::Apply: CurAtt is Null" <<endl;
#endif
return;
intArr->SetValue(i, IntArr->Value(i));
if(!myIndxes.IsNull() && !myValues.IsNull())
for(i = 1; i <= myIndxes->Upper();i++) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "i = " << i << " myIndxes->Upper = " << myIndxes->Upper() << endl;
cout << "myIndxes->Value(i) = " << myIndxes->Value(i) << endl;
cout << "myValues->Value(i) = " << myValues->Value(i) << endl;
aCurAtt->myValue = intArr;
}
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << " << Array Dump after Delta Apply >>" <<endl;
Handle(TColStd_HArray1OfInteger) IntArr2 = aCurAtt->Array();
for(i=IntArr2->Lower(); i<=IntArr2->Upper() && i <= MAXUP;i++)
Handle(TDF_Attribute) aTDFAttribute = Attribute();
Handle(TDataStd_IntPackedMap) aBackAtt = (*((Handle(TDataStd_IntPackedMap)*)&aTDFAttribute));
if(aBackAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfIntPAckedMap::Apply: OldAtt is Null" <<endl;
#endif
return;
}
if(aCurAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfIntAPckedMAp::Apply: CurAtt is Null" <<endl;
#endif
return;
Handle(TColStd_HArray1OfReal) Arr1, Arr2;
Arr1 = OldAtt->Array();
Arr2 = CurrAtt->Array();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(Arr1.IsNull())
cout <<"DeltaOnModificationOfRealArray:: Old Array is Null" <<endl;
if(Arr2.IsNull())
}
}
OldAtt->RemoveArray();
-#ifdef DEB
+#ifdef TDATASTD_DEB
if(OldAtt->Array().IsNull())
cout << "BackUp Arr is Nullified" << endl;
#endif
Handle(TDF_Attribute) TDFAttribute = Attribute();
Handle(TDataStd_RealArray) BackAtt = (*((Handle(TDataStd_RealArray)*)&TDFAttribute));
if(BackAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfRealArray::Apply: OldAtt is Null" <<endl;
#endif
return;
}
if(aCurAtt.IsNull()) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "DeltaOnModificationOfRealArray::Apply: CurAtt is Null" <<endl;
#endif
return;
realArr->SetValue(i, aRealArr->Value(i));
if(!myIndxes.IsNull() && !myValues.IsNull())
for(i = 1; i <= myIndxes->Upper();i++) {
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << "i = " << i << " myIndxes->Upper = " << myIndxes->Upper() << endl;
cout << "myIndxes->Value(i) = " << myIndxes->Value(i) << endl;
cout << "myValues->Value(i) = " << myValues->Value(i) << endl;
}
-#ifdef DEB
+#ifdef TDATASTD_DEB
cout << " << RealArray Dump after Delta Apply >>" <<endl;
Handle(TColStd_HArray1OfReal) aRArr = aCurAtt->Array();
for(i=aRArr->Lower(); i<=aRArr->Upper() && i <= MAXUP;i++)
}
}
status = GetRetrieveStatus();
-#ifdef DEB
+#ifdef TDOCSTD_DEB
cout<<"TDocStd_Application::Open(): The status = "<<status<<endl;
#endif
return status;
if(storer.StoreStatus() == PCDM_SS_OK)
D->SetSaved();
#ifdef BUC60867
-#ifdef DEB
+#ifdef TDOCSTD_DEB
cout<<"TDocStd_Application::SaveAs(): The status = "<<storer.StoreStatus()<<endl;
#endif
return storer.StoreStatus();
status = PCDM_SS_Failure;
}
#ifdef BUC60867
-#ifdef DEB
+#ifdef TDOCSTD_DEB
cout<<"TDocStd_Application::Save(): The status = "<<status<<endl;
#endif
return status;
void TDocStd_MultiTransactionManager::OpenCommand() {
if (myOpenTransaction) {
-#ifdef DEB
+#ifdef TDOCSTD_DEB
cout << "TDocStd_MultiTransactionManager::OpenCommand(): "
"Can't start new application transaction while a "
"previous one is not commited or aborted" << endl;
Standard_OStream& TNaming::Print (const TDF_Label& ACCESS, Standard_OStream& s) {
Handle(TNaming_UsedShapes) US;
if (!ACCESS.Root().FindAttribute(TNaming_UsedShapes::GetID(), US)) {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout<<"TNaming::Print(US): Bad access"<<endl;
#endif
return s;
if (!it.More()) return 0;
it.Next(); if (!it.More()) return 0;
//plus d un shape.
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<"WARNING IMPORTED"<<endl;
#endif
return 1;
FindFeaturesInAncestors (AS, Context, AncInFeature);
}
else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<" TNaming_Localization : Failure in the research of ancetres in TDF"<<endl;
#endif
}
}
else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<" TNaming_Localization : S n est pas dans le solide"<<endl;//S is not in the solid
#endif
}
TopTools_IndexedDataMapOfShapeListOfShape& Anc = itA.Value();
TopExp_Explorer exp(In,TS);
-#ifdef DEB
+#ifdef TNAMING_DEB
if (!exp.More()) cout <<" TNaming_Localization : Construction ancetres impossible"<<endl;
#endif
const TopoDS_Shape& SS = exp.Current();
TopExp::MapShapesAndAncestors(In, TS, TA, Anc);
}
else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<" TNaming_Localization : Construction ancetres impossible"<<endl;
#endif
}
TopExp::MapShapesAndAncestors(In, TS, TA, myAncestors.First());
}
else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<" TNaming_Localization : Construction ancetres impossible"<<endl;
#endif
}
return Standard_True;
}
}
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<"TNaming_Localizer:IsNewInLab : Shape n est pas dans le Label."<<endl;
#endif
return Standard_False;
LBNS.Append (TNaming_Tool::NamedShape(it.Shape(),Lab));
}
else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<"TNaming_Localizer: Shape modifie sans avoir ete cree"<<endl;
#endif
}
}
return aResult;
}
-#ifdef DEB
+#ifdef TNAMING_DEB
//=======================================================================
static Standard_CString NameTypeToString (const TNaming_NameType Type)
{
}
}
} catch (...) {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout << "Name::Solve: EXCEPTION==> NameType = " << NameTypeToString(myType) << " ";
PrintEntry(aLab);
#endif
}
else {
myNode = 0L;
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<"TNaming_Iterator : No Shape for this label"<<endl;
#endif
}
if(aMS.Extent())
aDMM.Bind(it.Key(), aMS);
} else {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout << "Key is not BOUND!" <<endl;
#endif
return Standard_False;
if (Neighbourg.IsEmpty()) {
-#ifdef DEB
+#ifdef TNAMING_DEB
cout <<"FindNeighbourg: impossible"<<endl;
#endif
return 0;
// Dimension is build on one or two shapes.
if (aGeomNum < 1 || aGeomNum > 2)
{
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDistance: 1 or 2 geometries are needed" << endl;
#endif
NullifyAIS(theAIS);
if (aShape1.IsNull())
{
- #ifdef DEB
+ #ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << endl;
#endif
NullifyAIS (theAIS);
if (aShape1.IsNull() || aShape2.IsNull())
{
- #ifdef DEB
+ #ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDistance : null shape" << endl;
#endif
NullifyAIS (theAIS);
{
if (aShape1.ShapeType () != TopAbs_EDGE)
{
- #ifdef DEB
+ #ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDistance : shape should be edge" << endl;
#endif
NullifyAIS (theAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputePerpendicular: at leat two constraintes are needed" << endl;
#endif
NullifyAIS(anAIS);
if (is_planar) GetShapesAndGeom(aConst,shape1,shape2,ageom3);
else GetTwoShapes(aConst,shape1,shape2);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputePerpendicular : null shape" << endl;
#endif
NullifyAIS(anAIS);
if (is_planar) {
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputePerpendicular: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeParallel: at least 2 constraintes are needed" << endl;
#endif
NullifyAIS(anAIS);
}
if (!aConst->IsPlanar()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeParallel: must be a planar constraint" << endl;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom(aConst,shape1,shape2,ageom3);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeParallel : null shape" << endl;
#endif
NullifyAIS(anAIS);
}
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeParallel: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 3) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraintes are needed" << endl;
#endif
NullifyAIS(anAIS);
Standard_Boolean is_planar(aConst->IsPlanar());
if (!is_planar) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << endl;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom(aConst,shape1,shape2,shape3,ageom3);
if (shape1.IsNull() || shape2.IsNull() || shape3.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << endl;
#endif
NullifyAIS(anAIS);
GetGoodShape(shape3);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << endl;
#endif
NullifyAIS(anAIS);
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 3)
{
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: at least 3 constraints are needed" << endl;
#endif
NullifyAIS(anAIS);
Standard_Boolean is_planar(aConst->IsPlanar());
if ( !is_planar )
{
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: must be a planar constraint" << endl;
#endif
NullifyAIS(anAIS);
if (shape1.IsNull() || shape2.IsNull() || shape3.IsNull())
{
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry : null shape" << endl;
#endif
NullifyAIS(anAIS);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull())
{
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeSymmetry: null plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeTangent: at leat two constraintes are needed" << endl;
#endif
NullifyAIS(anAIS);
return;
}
if (!aConst->IsPlanar()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeTangent: must be a planar constraint" << endl;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom(aConst,shape1,shape2,ageom3);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeTangent : null shape" << endl;
#endif
NullifyAIS(anAIS);
GetGoodShape(shape2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeTangent: nul plane" << endl;
#endif
NullifyAIS(anAIS);
GetOneShape( aConst, shape );
if (shape.IsNull() ) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeAngleForOneFace : null shape" << endl;
#endif
NullifyAIS(anAIS);
}
}
}
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd::Compute angle : Shape is not Compound or is Null" <<endl;
#endif
return (Standard_False);
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
if( nbgeom == 1 ) { ComputeAngleForOneFace( aConst, anAIS ); return; }
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeAngle: at least 2 constraints are needed" << endl;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom (aConst,shape1,shape2,ageom3);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeAngle : null shape" << endl;
#endif
NullifyAIS(anAIS);
aFace = TopoDS::Face(shape1);
else
if(!CheckIsShapeCompound(shape1, aFace)) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "Compute angle : Geom type = " << shape1.ShapeType()
<< " non traite"<<endl;
#endif
gp_Torus aTore = aSurfaFace.Torus();
anax1aFace1 = aTore.Axis();
} else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout<<"Compute angle"<<aTypeaFace<<" non traite"<<endl;
#endif
NullifyAIS(anAIS);
aFace = TopoDS::Face(shape2);
else
if(!CheckIsShapeCompound(shape2, aFace)) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "Compute angle : Geom type = " << shape2.ShapeType()
<< " non traite"<<endl;
#endif
gp_Torus aTore = aSurfaFace.Torus();
anax1aFace2 = aTore.Axis();
} else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "Compute angle " << aTypeaFace << " non traite"<<endl;
#endif
NullifyAIS(anAIS);
Handle(Geom_Line) computedgeom3 = new Geom_Line (aLine);
ageom3 = computedgeom3;
} else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout<<"Compute angle insertection of planes failed"<<endl;
#endif
NullifyAIS(anAIS);
}
} else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout<<"Compute angle faces are //"<<endl;
#endif
NullifyAIS(anAIS);
if (ageom3->IsKind(STANDARD_TYPE(Geom_Plane))) isplan = Standard_True;
else if (ageom3->IsKind(STANDARD_TYPE(Geom_Line))) isplan = Standard_False;
else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeAngle: unknown 3rd arg " << endl;
#endif
NullifyAIS(anAIS);
Standard_ProgramError::Raise ("TPrsStd_ConstraintTools::ComputeConcentric: at least 2 constraintes are needed");
}
if (!aConst->IsPlanar()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeConcentric: must be a planar constraint" << endl;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom(aConst,shape1,shape2,ageom3);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeConcentric : null shape" << endl;
#endif
NullifyAIS(anAIS);
//ota : to allow concentric constraint display between vertex and edge
if (shape1.ShapeType() != TopAbs_EDGE && shape2.ShapeType() != TopAbs_EDGE) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeConcentric: concentric between two vertexes : NOT DISPLAYED" << endl;;
#endif
NullifyAIS(anAIS);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom3);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeConcentric: nul plane" << endl;;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRadius: at least one constrainte is needed" << endl;
#endif
NullifyAIS(anAIS);
TopoDS_Shape shape1 ;
GetOneShape (aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRadius: null shape" << endl;
#endif
NullifyAIS(anAIS);
shape1.ShapeType()==TopAbs_COMPSOLID ||
shape1.ShapeType()==TopAbs_SOLID ||
shape1.ShapeType()==TopAbs_SHELL ) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRadius: not good shape" << endl;
#endif
NullifyAIS(anAIS);
GetGeom(aConst,ageom2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRadius: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMinRadius: at least one constrainte is needed" << endl;
#endif
NullifyAIS(anAIS);
TopoDS_Shape shape1 ;
GetOneShape (aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMinradius: null shape" << endl;
#endif
NullifyAIS(anAIS);
shape1.ShapeType()==TopAbs_COMPSOLID ||
shape1.ShapeType()==TopAbs_SOLID ||
shape1.ShapeType()==TopAbs_SHELL ) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMinRadius: not good shape" << endl;
#endif
NullifyAIS(anAIS);
GetGeom(aConst,ageom2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMinRadius: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: at least one constrainte is needed" << endl;
#endif
NullifyAIS(anAIS);
TopoDS_Shape shape1 ;
GetOneShape (aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMaxradius: null shape" << endl;
#endif
NullifyAIS(anAIS);
shape1.ShapeType()==TopAbs_COMPSOLID ||
shape1.ShapeType()==TopAbs_SOLID ||
shape1.ShapeType()==TopAbs_SHELL ) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: not good shape" << endl;
#endif
NullifyAIS(anAIS);
GetGeom(aConst,ageom2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeMaxRadius: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 4) {
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeEqual: at least four geometries are needed" << endl;;
+#endif
NullifyAIS(anAIS);
return;
}
GetShapesAndGeom(aConst, aShape1, aShape2, aShape3, aShape4, aGeom);
if (aShape1.IsNull()||aShape2.IsNull()||
aShape3.IsNull()||aShape4.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : null shape" << endl;
#endif
NullifyAIS(anAIS);
if (!CheckShapesPair(aShape1, aShape2) ||
!CheckShapesPair(aShape3, aShape4)){
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeEqualDistance : at least one pair of shapes is incorrect"<<endl;
#endif
NullifyAIS(anAIS);
if (!IsPlanar || aPlane.IsNull()) {
//create the plane
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout<< "The constraint plane is not assigned "<< endl;
#endif
NullifyAIS(anAIS);
gp_Dir aDir1 = aCurve1.Line().Direction();
gp_Dir aDir2 = aCurve2.Line().Direction();
if (!(aDir1.IsParallel(aDir2, Precision::Confusion()))) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << " Lines are not parallel"<<endl;
#endif
return Standard_False;
gp_Pnt aCntr1 = aCurve1.Circle().Location(); //get the circle center
gp_Pnt aCntr2 = aCurve2.Circle().Location(); //get the circle center
if (!aCntr1.IsEqual(aCntr2,Precision::Confusion())){
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << " Circles are not concentric"<<endl;
#endif
return Standard_False;
}
}
else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "Incorrect pair of curves "<<endl;
#endif
return Standard_False;
{
gp_Pnt aCntr = aCurve.Circle().Location();
if (!aCntr.IsEqual(aPnt, Precision::Confusion())){
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << " The point doesn't coincide with the circle center"<<endl;
#endif
return Standard_False;
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeEqualRadius: at least two geometries are needed" << endl;;
#endif
NullifyAIS(anAIS);
GetShapesAndGeom(aConst, shape1, shape2, ageom3);
if (shape1.IsNull()||shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeEqualRadius : null shape" << endl;
#endif
NullifyAIS(anAIS);
aDir1.IsParallel(aDir2, Precision::Confusion()))
aplane = aPlane2;
else {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRadiusRelation: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDiameter: at least one constrainte is needed" << endl;;
#endif
NullifyAIS(anAIS);
GetOneShape(aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDiameter : null shape" << endl;
#endif
NullifyAIS(anAIS);
GetGeom(aConst,ageom2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeDiameter: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeFix: at least one constrainte is needed" << endl;;
#endif
NullifyAIS(anAIS);
return;
}
if (!aConst->IsPlanar()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeFix: must be a planar constraint" << endl;;
#endif
NullifyAIS(anAIS);
GetOneShape(aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeFix : null shape" << endl;
#endif
NullifyAIS(anAIS);
GetGeom(aConst,ageom2);
Handle(Geom_Plane) aplane = Handle(Geom_Plane)::DownCast(ageom2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeFix: nul plane" << endl;
#endif
NullifyAIS(anAIS);
if (is_planar) {
GetGeom (aConst,aplane);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeOffset: null plane" << endl;
#endif
NullifyAIS(anAIS);
}
if (S1.IsNull() || S2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeOffset: null shape" << endl;
#endif
NullifyAIS(anAIS);
return;
}
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeOffset: Case not implemented" << endl;
#endif
NullifyAIS(anAIS);
TopoDS_Shape shape1,shape2 ;
GetTwoShapes(aConst,shape1,shape2);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 2) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeCoincident: at leat two constraintes are needed" << endl;
#endif
NullifyAIS(anAIS);
}
if (!aConst->IsPlanar()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeCoincident: must be a planar constraint" << endl;
#endif
anAIS.Nullify() ;
Handle(Geom_Plane) aplane;
GetShapesAndGeom(aConst,shape1,shape2,aplane);
if (shape1.IsNull() || shape2.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul shape" << endl;
#endif
NullifyAIS(anAIS);
GetGoodShape(shape1);
GetGoodShape(shape2);
if (aplane.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeCoincident: nul plane" << endl;
#endif
NullifyAIS(anAIS);
{
Standard_Integer nbgeom = aConst->NbGeometries();
if (nbgeom < 1) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputeRound: at leat one geometry is needed" << endl;
#endif
NullifyAIS(anAIS);
TopoDS_Shape shape1;
GetOneShape (aConst,shape1);
if (shape1.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "TPrsStd_ConstraintTools::ComputePlacement: nul shape" << endl;
#endif
NullifyAIS(anAIS);
{
Handle(TNaming_NamedShape) atgeom = aConst->GetPlane();
if (atgeom.IsNull()) {
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout<<"TPrsStd_ConstraintTools::GetGeom : aConst->GetPlane().IsNull()"<<endl;
#endif
return;
if (TDataXtd_Geometry::Plane(label,aplane)) aGeom = new Geom_Plane(aplane);
else if (TDataXtd_Geometry::Line(label,anaxis)) aGeom = new Geom_Line(anaxis);
else if (TDataXtd_Geometry::Point(label,apoint)) aGeom = new Geom_CartesianPoint(apoint);
-#ifdef DEB
+#ifdef TPRSSTD_DEB
else {
cout << "TPrsStd_ConstraintTools::GetGeom no geom on label " << endl;
}
if ( drivertable.IsNull() )
{
drivertable = new TPrsStd_DriverTable;
-#ifdef DEB
+#ifdef TPRSSTD_DEB
cout << "The new TPrsStd_DriverTable was created" << endl;
#endif
}
SWDRAW::Init (theDI);
-#ifdef DEB
+#ifdef TESTTOPOPE_DEB
cout << "Draw Plugin : All topological operations kernel commands are loaded" << endl;
#endif
}
return r;
}
-#ifdef DEB
+#ifdef TESTTOPOPE_DEB
Standard_Integer iS = myHDS->Shape(S,FindKeep);
cout<<endl<<"***** shape "<<iS<<" has no ancestor index : use shapemaps"<<endl;
#endif
void TopClass_Classifier3d::Compare(const TopoDS_Face& Face,
const TopAbs_Orientation) {
if(!isSet) {
+#ifdef TOPCLASS_DEB
cout<<" Call to TopClass_Classifier3d::Compare without a Reset ! ";
+#endif
return;
}
myFace = myIntersector.Face();
if(Abs(myParam)<=myTolerance) {
//-- #########################################
+#ifdef TOPCLASS_DEB
cout<<" myParam = "<<myParam<<" ds TopClass_Classifier3d.gxx "<<endl;
+#endif
//-- #########################################
myState = TopAbs_ON;
}
else if(myIntersector.Transition() == IntCurveSurface_In) {
myState = TopAbs_OUT;
}
- else {
+#ifdef TOPCLASS_DEB
+ else {
cout<<" -------- Probleme ds TopClass_Classifier3d.gxx "<<endl;
- }
+ }
+#endif
}
}
else {
myState = 4; //-- OUT --
}
else {
-#ifdef DEB
+#ifdef TOPCLASS_DEB
cout<<"*Probleme ds TopClass_SolidClassifier.gxx"<<endl;
#endif
}
myState = 4; //-- OUT --
}
else {
-#ifdef DEB
+#ifdef TOPCLASS_DEB
cout<<"*Probleme ds TopClass_SolidClassifier.gxx "<<endl;
#endif
}
return TopAbs_INTERNAL;
else if (Aft == TopAbs_OUT)
return TopAbs_REVERSED;
+#ifdef TOPCNX_DEB
else
cout << "\n*** Complex Transition : unprocessed state"<<endl;
+#endif
}
else if (Bef == TopAbs_OUT) {
if (Aft == TopAbs_IN )
return TopAbs_FORWARD;
else if (Aft == TopAbs_OUT)
return TopAbs_EXTERNAL;
+#ifdef TOPCNX_DEB
else
cout << "\n*** Complex Transition : unprocessed state"<<endl;
+#endif
}
+#ifdef TOPCNX_DEB
else
cout << "\n*** Complex Transition : unprocessed state"<<endl;
+#endif
return TopAbs_INTERNAL;
}
Standard_Real par1 = CPI1->Parameter();
Standard_Real par2; Standard_Boolean ok = FUN_tool_parE(e1,par1,e2,par2);
if (!ok) {
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout<<"**********TopOpeBRep FUN_shareNOG**********"<<endl;
#endif
return Standard_False;
Standard_Boolean TopOpeBRep_DSFiller::IsContext1d(const TopoDS_Shape& aS) const
{
Standard_Boolean is1d = IsMadeOf1d(aS);
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
if ( is1d ) cout<<"TopOpeBRep_DSFiller : 1d"<<endl;
#endif
if ( !is1d ) return Standard_False;
Standard_Boolean TopOpeBRep_DSFiller::CheckInsert(const TopoDS_Shape& aS1,const TopoDS_Shape& aS2) const
{
if (aS1.IsEqual(aS2)) {
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout<<"TopOpeBRep_DSFiller : CheckInsert : S1 == S2"<<endl;
#endif
return Standard_False;
if (!found) MakeGeometry(P2D,G,K);
Standard_Boolean foundpoint = (found) && (K == TopOpeBRepDS_POINT);
-#ifdef DEB
- Standard_Boolean foundvertex = (found) && (K == TopOpeBRepDS_VERTEX);
-#endif
Standard_Boolean isnewpoint = (!found) && (K == TopOpeBRepDS_POINT);
Standard_Boolean isnewvertex = (!found) && (K == TopOpeBRepDS_VERTEX);
Standard_Boolean faulty = (isvertex && isnewpoint) || (!isvertex && isnewvertex);
if (faulty) {
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
+ Standard_Boolean foundvertex = (found) && (K == TopOpeBRepDS_VERTEX);
cout<<"- - - faulty EdgesFiller : G "<<G<<" K ";TopOpeBRepDS::Print(K,cout);cout.flush();
cout<<" isvertex="<<isvertex;cout.flush();
cout<<" isop="<<foundpoint<<" isov="<<foundvertex;cout.flush();
if ( t == TopOpeBRep_WALKING ) {
if ( nbvp < 2 ) {
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout<<"\n=== Nb de IntPatch_Point sur WL incorrect : "<<nbvp<<" ===\n";
#endif
check = Standard_False;
}
}
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
if (!check) { cout<<"# DEB CheckLine : rejet de ";TopOpeBRep::Print(t,cout);cout<<" a "<<nbvp<<" points"<<endl; }
#endif
Standard_Boolean CPIfound = GetGeometry(itCPIL,VP,PVIndex,PVKind);
if ( !CPIfound ) {
if (iVP != iINON1 && iVP != iINONn) {
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout<<"VP "<<iVP<<" on "<<0<<" : point d'intersection anormal : rejet"<<endl;
#endif
return;
Standard_Integer obOO = TopOpeBRepTool_TOOL::OnBoundary(OOpar,OOE); //vertex can be missed
if ((obRest == EXTERNAL)||(obOO == EXTERNAL)){
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
if(obRest==EXTERNAL) cout<<"***********ProcessRLine : faulty parameter on Erest"<<endl;
if(obOO==EXTERNAL) cout<<"***********ProcessRLine : faulty parameter on OOE"<<endl;
#endif
Handle(IntPatch_WLine) anWLine = NULL;
anWLine = GetMergedWLineOnRestriction(theSlin,TolVrtx,aLineOn2S);
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout << "*** TopOpeBRep_FaceIntersector: Merge WLines on Restriction S1 to WLine ***" << endl;
#endif
theSlin.Clear();
Handle(IntPatch_WLine) anWLine = NULL;
anWLine = GetMergedWLineOnRestriction(theSlin,TolVrtx,aLineOn2S);
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
cout << "*** TopOpeBRep_FaceIntersector: Merge WLines on Restriction S2 to WLine***" << endl;
#endif
theSlin.Clear();
// so this suggestion must be developed carefully. while we don't classify it!
// *****************************************************************************
}
-#ifdef DEB
+#ifdef TOPOPEBREP_DEB
if( result != 0 )
cout << "# one of the SOLIDs probably is a HALF SPACE" << endl;
#endif
gp_Pnt P2(aXmax, aYmax, aZmax);
Standard_Real d = P1.Distance(P2);
if (d > newtol) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"\npoint P"<<iv<<" "<<Pv.X()<<" "<<Pv.Y()<<" "<<Pv.Z()<<endl;
cout<<"TopOpeBRepBuild_Builder::End BOX newtol "<<newtol<<" -> "<<d<<endl;
#endif
Handle(Geom_Surface) su = BRep_Tool::Surface(myFaceReference);
Handle(Geom_Plane) suplan = Handle(Geom_Plane)::DownCast(su);
if ( suplan.IsNull() ) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"NYI : GParamOnReference : not planar"<<endl;
#endif
return Standard_False;
case GeomAbs_Parabola:
P = ElCLib::Parameter(AC.Parabola(),p2); break;
default :
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"NYI : GParamOnReference : OtherCurve on planar surface"<<endl;
#endif
return Standard_False;
Standard_Boolean so = Standard_True;
Standard_Boolean ok = FUN_tool_curvesSO(newE,par,TopoDS::Edge(EOR),so);
if (!ok) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"GSplitEdgeWES: cannot orient SDM split of an edge"<<endl;
#endif
//return; // nyiFUNRAISE
Standard_Boolean so = Standard_True;
Standard_Boolean ok = FUN_tool_curvesSO(newE,par,TopoDS::Edge(EOR),so);
if (!ok) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"GSplitEdgeWES: cannot orient SDM split of an edge"<<endl;
#endif
}
for(;itloe.More();itloe.Next()) {
TopoDS_Shape& E = *((TopoDS_Shape*)(&itloe.Value()));
if(mySectEdgeDSCurve.IsBound(E)) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"BRepAlgo_DSAccess::MakeEdgeAncestorFromCurve : program error"<<endl;
#endif
}
return;
}
else {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"TopOpeBRepBuild_MergeKPart soldisj : ires = "<<ires<<endl;
#endif
return;
{
Standard_Boolean lesmemes = S1.IsEqual(S2);
if (lesmemes) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"TopOpeBRepBuild : S1 == S2"<<endl;
#endif
return;
void TopOpeBRepBuild_Pave::Dump() const
{
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<Parameter()<<" ";TopAbs::Print(Vertex().Orientation(),cout);
#endif
}
if (!anAvoidSubshMap.Contains (aSubshMap(i)) )
aSubsh = aSubshMap(i);
if (aSubsh.IsNull()) {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"FindStateThroughVertex: warning: all vertices are avoided"<<endl;
#endif
return TopAbs_UNKNOWN; // failure
myBuildTool.PCurve(WESF,E,C2D);
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
EhasPConWESF = FC2D_HasCurveOnSurface(E,WESF);
if (!EhasPConWESF) cout<<"TopOpeBRepBuild_Builder::GFillCurveTopologyWES : Null PCurve on F"<<iWESF<<endl;
#endif
} // === fin RESNEWSHE
else {
-#ifdef DEB
+#ifdef TOPOPEBREPBUILD_DEB
cout<<"MergeKPartiskole : ires = "<<ires<<endl;
#endif
}
cout<<endl;GdumpSHA(FF,(char *) "#--- GFABUMakeFaces ");cout<<endl;
GdumpFABU(FABU);debgfabu(iF);
}
- Standard_Boolean strange = TopOpeBRepDS_GettraceSTRANGE();
#endif
TopTools_ListOfShape lnewFace;
Standard_Boolean topurge = FUN_purgeFon1nonoriE(newFace);
if (topurge) {
-#ifdef DEB
- if (strange) cout<<"Builder::GFABUMakeFaces -> purgeFon1nonoriE\n";
+#ifdef TOPOPEBREPBUILD_DEB
+ if (TopOpeBRepDS_GettraceSTRANGE())
+ cout<<"Builder::GFABUMakeFaces -> purgeFon1nonoriE\n";
#endif
continue;
}
Standard_Real newtol,newparmin,newparmax;
// MSV Nov 12, 2001: if approx failed than leave old curves of degree 1
if (!approxMade) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"TopOpeBRepDS_BuildTool::ApproxCurves : approx failed, leave curves of degree 1"
<<endl;
#endif
bI = bI && ChkIntgInterf(LI);
}
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
PrintIntg(cout);
#endif
// CheckEdgeParameter();
case TopOpeBRepDS_SURFACE :
{
if(myHDS->NbSurfaces() < I) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Surpassed index of TopOpeBRepDS_SURFACE. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbSurfaces();
#endif
case TopOpeBRepDS_CURVE :
{
if(myHDS->NbCurves() < I) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Surpassed index of TopOpeBRepDS_CURVE. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbCurves();
#endif
case TopOpeBRepDS_POINT :
{
if(myHDS->NbPoints() < I) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Surpassed index of TopOpeBRepDS_POINT : actual index : "<<I;
cout<<". Index max : "<<myHDS->NbPoints()<<endl;
#endif
// topology
if(myHDS->NbShapes() < I) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Surpassed index of TopOpeBRepDS_Shape_. actual index : "<<I;
cout<<". Index max : "<<myHDS->NbShapes();
#endif
break ;
}
if(S.ShapeType() != se) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Error : Shape "<<I<<" is a ";
TopOpeBRepDS::Print(TopOpeBRepDS::ShapeToKind(S.ShapeType()), cout);
cout<<" and not a ";
const TopoDS_Shape& Sind = myHDS->Shape(i);
const TopTools_ListOfShape& losi = BDS.ShapeSameDomain(Sind);
if(!CheckShapes(losi)) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Shape of ShapeSameDomain (n*n "<<i;
cout<<") is not defined in the DS"<<endl;
#endif
Curr = BDS.SameDomainRef(i);
Loc = BDS.SameDomainRef(Curr);
if(Curr && (Curr != Loc)) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"SameDomaineRef of Shape "<<i<<" = "<<Curr;
cout<<". SameDomaineRef of Shape "<<Curr<<" = "<<Loc<<endl;
#endif
// Verification du type des differents Shapes SameDomain
const TopoDS_Shape& Sref = myHDS->Shape(Curr);
if(Sind.ShapeType() != Sref.ShapeType()) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEBDEB
cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain."<<endl;
cout<<"Type of Shape n*n "<<i<<" = ";
PrintShape(Sind.ShapeType(),cout);
liolos.Next();
}
if(!bb) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain. ";
cout<<"The reference of "<<i<<", is "<<Curr<<"."<<endl;
cout<<"However, Shape n*n "<<i;
Dist = P1.Distance(P2);
if(Dist <= tol1 + tol2) {
if(sdr1 != sdr2) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Pb Vertex n+n"<<Curr1<<" and n*n"<<Curr2;
cout<<" : same place, not SameDomain"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
}
}
else if(sdr1 == sdr2) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Pb Vertex "<<Curr1<<" and "<<Curr2;
cout<<" : SameDomain, not same place"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
const gp_Pnt& Pnt2 = TopOpeBRepTool_ShapeTool::Pnt(S1);
Dist = Pnt1.Distance(Pnt2);
if(Dist <= tol1 + tol2) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Attention : Vertex "<<Curr1<<" and Point "<<PE.Index();
cout<<" are confused"<<endl;
cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
for(j = i+1;j < NbPo;j++) {
const TopOpeBRepDS_Point& dsPnt2 = myHDS->Point(j);
if(dsPnt1.IsEqual(dsPnt2)) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"Attention : points "<<i<<" and "<<j<<" are confused"<<endl;
cout<<" Tol of Point n*n"<<i<<" = "<<dsPnt1.Tolerance()<<endl;
cout<<" Tol of Point n*n"<<j<<" = "<<dsPnt1.Tolerance()<<endl;
else if ( r1 != iS1 && r2 != iS2 ) {
if (r1 != r2) {
// Standard_ProgramError::Raise("FacesFiller::Insert SD 1");
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"FacesFiller::Insert SD 1"<<endl;
#endif
}
const TopOpeBRepDS_Point& TopOpeBRepDS_DataStructure::Point(const Standard_Integer I)const
{
if ( I < 1 || I > myNbPoints ) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"acces au POINT "<<I<<" incorrect "<<myNbPoints<<" max"<<endl;
#endif
Standard_ProgramError::Raise("TopOpeBRepDS_DataStructure::Point");
TopOpeBRepDS_Point& TopOpeBRepDS_DataStructure::ChangePoint(const Standard_Integer I)
{
if ( I < 1 || I > myNbPoints ) {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"acces au POINT "<<I<<" incorrect "<<myNbPoints<<" max"<<endl;
#endif
Standard_ProgramError::Raise("TopOpeBRepDS_DataStructure::Point");
else if ( I->IsKind(STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference)) )
p = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I)->Parameter();
else {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"EdgeInterference : mauvais type d'interference"<<endl;
#endif
Standard_Failure::Raise("FDS_Parameter");
static void FUN_Raise()
{
Standard_ProgramError::Raise("Edge3dInterferenceTool");
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout <<" ************** Failure in Edge3dInterferenceTool"<<endl;
#endif
}
else if ( I->IsKind(STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference)) )
p = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I)->Parameter();
else {
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"EdgeInterference : mauvais type d'interference"<<endl;
#endif
Standard_ProgramError::Raise("TopOpeBRepDS_EdgeInterferenceTool1");
static void FUN_Raise()
{
-#ifdef DEB
+#ifdef TOPOPEBREPDS_DEB
cout<<"****************************** TopOpeBRepDS_TOOL"<<endl;
#endif
}
typC1 != STANDARD_TYPE(Geom_Ellipse) &&
typC1 != STANDARD_TYPE(Geom_BSplineCurve) &&
typC1 != STANDARD_TYPE(Geom_BezierCurve)) {
-#ifdef DEB
+#ifdef TOPOPEBREPTOOL_DEB
cout << " TopOpeBRepTool_FuseEdge : Type de Support non traite" << endl;
#endif
return Standard_False;
return ng;
}
}
-#ifdef DEB
+#ifdef TOPOPEBREPTOOL_DEB
cout<<"FUN_tool_nggeomF NYI"<<endl;
#endif
return gp_Dir(0,0,1);
//purpose :
//=======================================================================
void TopOpeBRepTool_HBoxTool::DumpB
-#ifdef DEB
+#ifdef TOPOPEBREPTOOL_DEB
(const Bnd_Box& B)
{
if (B.IsVoid()) cout<<"# IsVoid";
// else if (o == TopAbs_INTERNAL) myState == TopAbs_IN;
else if (o == TopAbs_INTERNAL) myState = TopAbs_IN;
else {
-#ifdef DEB
+#ifdef TOPOPEBREPTOOL_DEB
cout<<"StateP2DReference o<>E,I"<<endl;
#endif
break;
ngF = ng; return Standard_True;
}
}
-#ifdef DEB
+#ifdef TOPOPEBREPTOOL_DEB
cout<<"FUN_tool_nggeomF NYI"<<endl;
#endif
return Standard_False;
if (!aOShell.IsNull()) {
aCShell = new StepShape_ClosedShell;
aCShell->Init (aOShell->Name(),aOShell->CfsFaces());
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout<<"Warning: MakeBRepWithVoids: Open shell in the solid; treated as closed"<<endl;
#endif
}
else
S.Append(aCShell);
}
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
else cout<<"*** MakeBRepWithVoids : Shell not mapped"<<endl;
#endif
}
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
else cout << "Shell not mapped" << endl;
#endif
/* //:d7
// a 3D Curve is constructed
// -------------------------
-#ifdef DEB
+#ifdef TOPODSTOSTEP_DEB
cout << "Warning: TopoDSToStep_MakeStepEdge: edge without 3d curve; creating..." << endl;
#endif
if ((SA.GetType() == GeomAbs_Plane) &&
const TopoDS_Wire theOuterWire = BRepTools::OuterWire(ForwardFace);
if (theOuterWire.IsNull()) {
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout<< "Warning : Face without wire not mapped";
#endif
FP->AddWarning(errShape, " Face without wire not mapped");
MkWire.Init(CurrentWire, aTool, FP);
if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value());
else {
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout << TopoDSToStep::DecodeWireError(MkWire.Error()) << endl;
#endif
FP->AddWarning(errShape, " a Wire not mapped");
void TopoDSToStep_Tool::SetCurrentShell(const TopoDS_Shell& S)
{
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout << "Process a Shell which is ";
switch(S.Orientation())
{
void TopoDSToStep_Tool::SetCurrentFace(const TopoDS_Face& F)
{
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout << " Process a Face which is ";
switch(F.Orientation())
{
void TopoDSToStep_Tool::SetCurrentWire(const TopoDS_Wire& W)
{
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout << " Process a Wire which is ";
switch(W.Orientation())
{
void TopoDSToStep_Tool::SetCurrentEdge(const TopoDS_Edge& E)
{
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
cout << " Process Edge which is ";
switch(E.Orientation())
{
{
if (theEdge.Orientation() == TopAbs_INTERNAL ||
theEdge.Orientation() == TopAbs_EXTERNAL ) {
-#ifdef DEB
+#ifdef TOPODSTOSTEP_DEB
cout <<"Warning: TopoDSToStep_WireframeBuilder::GetTrimmedCurveFromEdge: Edge is internal or external; dropped" << endl;
#endif
return Standard_False;
Gpms = MakeTrimmedCurve (gtpL.Value(), pmsP1, pmsP2, 0, length, Standard_True );
// (anEdge.Orientation() == TopAbs_FORWARD));
}
-#ifdef DEB
+#ifdef TOPODSTOSTEP_DEB
else cout << "Warning: TopoDSToStep_WireframeBuilder::GetTrimmedCurveFromEdge: Null-length curve not mapped" << endl;
#endif
}
for (;It.More();It.Next()) {
TopoDS_Face curFace = TopoDS::Face(It.Value());
if (GetTrimmedCurveFromFace(curFace, aMap, aCurveList)) result = Standard_True;
-#ifdef DEBUG
+#ifdef TOPODSTOSTEP_DEB
if(!result) {
cout << "ERROR extracting trimmedCurve from Face" << endl;
//BRepTools::Dump(curFace,cout); cout<<endl;
if(quantity->Name() == aquantity) return quantity;
}
+#ifdef UNITS_DEB
cout<<"Warning: BAD Quantity = Units::Quantity(quantity('" << aquantity << "'))" << endl;
+#endif
return nullquantity;
}
}
}
+#ifdef UNITS_DEB
cout<<"Warning: BAD Quantity = Units::Quantity(unit('" << symbol << "'))" << endl;
+#endif
return NULL;
}
lastunit = TCollection_AsciiString(aUnit);
Units_UnitSentence unitsentence(aUnit);
if(!unitsentence.IsDone()) {
+#ifdef UNITS_DEB
cout<<"can not convert - incorrect unit => return 0.0"<<endl;
+#endif
return 0.0;
}
Handle(Units_Token) token = unitsentence.Evaluate();
lastunit = TCollection_AsciiString(aUnit);
Units_UnitSentence unitsentence(aUnit);
if(!unitsentence.IsDone()) {
+#ifdef UNITS_DEB
cout<<"Warning: can not convert - incorrect unit => return 0.0"<<endl;
+#endif
return 0.0;
}
Handle(Units_Token) token = unitsentence.Evaluate();
}
}
+#ifdef UNITS_DEB
cout<<" La grandeur physique "<<aquantity<<" n'existe pas."<<endl;
+#endif
}
//=======================================================================
}
}
+#ifdef UNITS_DEB
cout<<" La grandeur physique "<<aquantity<<" n'existe pas."<<endl;
+#endif
}
//=======================================================================
{
ifstream file(afilename, ios::in);
if(!file) {
+#ifdef UNITS_DEB
cout<<"unable to open "<<afilename<<" for input"<<endl;
+#endif
return;
}
themeasurement=avalue;
Units_UnitSentence unit(aunit);
if(!unit.IsDone()) {
+#ifdef UNITS_DEB
cout<<"can not create Units_Measurement - incorrect unit"<<endl;
+#endif
myHasToken = Standard_False;
}
else {
themeasurement = oldtoken->Multiplied(themeasurement);
themeasurement = newtoken->Divided(themeasurement);
}
+#ifdef UNITS_DEB
else {
cout<<" The units don't have the same physical dimensions"<<endl;
}
+#endif
}
if(!LastWord.IsIntegerValue()) {
// unknown expression - not create sentene
thesequenceoftokens->Clear();
-#ifdef DEB
+#ifdef UNITS_DEB
cout<<"Warning: can not create correct sentence from string: "<<astring<<endl;
#endif
return;
( token->Mean()=="0" && ( PrevMean=="M" || PrevMean=="U" || PrevMean=="MU" ) ) ) {
// incorrect situation
thesequenceoftokens->Clear();
-#ifdef DEB
+#ifdef UNITS_DEB
cout<<"Warning: can not create correct sentence from string: "<<astring<<endl;
#endif
return;
const
{
if(fabs(atoken->Value())<1.e-40) {
-#ifdef DEB
+#ifdef UNITS_DEB
cout<<"Warning: division on token with value=0 => return initial token."<<endl;
#endif
return this;
ifstream file(afilename, ios::in);
if(!file) {
+#ifdef UNITS_DEB
cout<<"unable to open "<<afilename<<" for input"<<endl;
+#endif
return;
}
Handle(Units_Dimensions) dimensions =
new Units_Dimensions (M, L, T, I, t, N, J, P, S);
-#ifdef DEB
- /*cout << " Name of Dimension : " << name << endl ;
- cout << MM << " " << LL << " " << TT << " "
- << II << " " << tt << " " << NN << " "
- << JJ << " " << PP << " " << SS << endl;
- cout << M << " " << L << " " << T << " "
- << I << " " << t << " " << N << " "
- << J << " " << P << " " << S << endl;*/
-#endif
-
numberofunits = 0;
theunitssequence = new Units_UnitsSequence();
quantity = new Units_Quantity(name,dimensions,theunitssequence);
if(unitssequence->Length())
return unitssequence->Value(1)->SymbolsSequence()->Value(1)->String();
else {
+#ifdef UNITS_DEB
cout<<" Pas d'unite active pour "<<aquantity<<endl;
+#endif
return "";
}
}
if(index2)
return unitssequence->Value(index2)->SymbolsSequence()->Value(1)->String();
else {
+#ifdef UNITS_DEB
cout<<" Pas d'unite active pour "<<aquantity<<endl;
+#endif
return TCollection_AsciiString() ;
}
}
aValue = Units::ToSI(aData,current.ToCString());
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(aQuantity,aValue);
}
+#ifdef UNITSAPI_DEB
else {
cout <<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
aValue = Units::ToSI(aData,current.ToCString());
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(aQuantity,aData);
aValue = Units::FromSI(aValue,current.ToCString());
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
aValue = Units::FromSI(aData,current.ToCString());
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
aValue = AnyToAny(aData,current.ToCString(),aUnit);
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
TCollection_AsciiString current(CurrentUnits->Value(aQuantity));
aValue = AnyToAny(aData,aUnit,current.ToCString());
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
if( quantity ) {
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(quantity,aValue);
}
+#ifdef UNITSAPI_DEB
else
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << ")" << endl;
+#endif
return aValue;
}
if( quantity ) {
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(quantity,aValue);
}
+#ifdef UNITSAPI_DEB
else
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << "," << aDim << ")" << endl;
+#endif
return aValue;
}
if( quantity ) {
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(quantity,aValue);
}
+#ifdef UNITSAPI_DEB
else
cout<<"Warning: BAD Quantity returns in UnitsAPI::AnyToLS(" << aData << "," << aUnit << ")" << endl;
+#endif
return aValue;
}
if( CurrentUnits->Find(aQuantity) ) {
aValue = LocalSystemUnits.ConvertUserSystemValueToSI(aQuantity,aData);
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
if( CurrentUnits->Find(aQuantity) ) {
aValue = LocalSystemUnits.ConvertSIValueToUserSystem(aQuantity,aValue);
}
+#ifdef UNITSAPI_DEB
else {
cout<<"Warning: UnitsAPI,the quantity '" << aQuantity << "' does not exist in the current units system" << endl;
}
+#endif
return aValue;
}
aCurve2d = aBSpline2d;
}
else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Parabola))) {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "PCURVE of Parabola type in U or V Periodic Surface" << endl;
cout << "Parameters Not transformed to Degree" << endl;
#endif
}
else if (aCurve2d->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "PCURVE of Hyperbola type in U or V Periodic Surface" << endl;
cout << "Parameters Not transformed to Degree" << endl;
#endif
return myNewBSpline2d;
}
else {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "PCURVE of Other Types of Bounded Curve in U or V Periodic Surface" << endl;
cout << "Parameters Not transformed to Degree" << endl;
#endif
aPcurve = aBSpline2d;
}
else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Parabola))) {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "PCURVE of Parabola type" << endl;
cout << "Parameters Not Yet transformed according to LenghtUnit" << endl;
#endif
return aPcurve;
}
else if (aPcurve->IsKind(STANDARD_TYPE(Geom2d_Hyperbola))) {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "PCURVE of Hyperbola type" << endl;
cout << "Parameters Not Yet transformed according to LenghtUnit" << endl;
#endif
aPcurve = aBSpline2d;
}
else {
-#ifdef DEBUG
+#ifdef UNITSMETHODS_DEB
cout << "DegreeToRadian : Type " << aPcurve->DynamicType();
cout << " not yet implemented" << endl;
#endif
TCollection_AsciiString checkValid = check.Value();
Standard_Boolean ToCheck = Standard_True;
if (!checkValid.IsEmpty()) {
-#ifdef DEB
+#ifdef VIEWERTEST_DEB
cout <<"DONT_SWITCH_IS_VALID positionnee a :"<<checkValid.ToCString()<<"\n";
#endif
if ( checkValid=="true" || checkValid=="TRUE" ) {
ToCheck= Standard_False;
}
} else {
-#ifdef DEB
+#ifdef VIEWERTEST_DEB
cout <<"DONT_SWITCH_IS_VALID non positionne"<<"\n";
#endif
}
MyGraphicDriver->Layer (MyCLayer);
MyCLayer.ptrLayer->layerData = this;
-#ifdef DEBUG
+#ifdef VISUAL3D_DEB
cout << "Visual3d_Layer::Visual3d_Layer" << endl;
call_def_ptrLayer ptrLayer;
ptrLayer = (call_def_ptrLayer) MyCLayer.ptrLayer;
#ifdef TRACE_CALL
cout << "Visual3d_Layer::End" << endl;
#endif
-#ifdef DEBUG
+#ifdef VISUAL3D_DEB
cout << "Visual3d_Layer::End" << endl;
call_def_ptrLayer ptrLayer;
ptrLayer = (call_def_ptrLayer) MyCLayer.ptrLayer;
// Flush all graphics
MyGraphicDriver->EndLayer ();
theLayerState = Standard_False;
-#ifdef DEBUG
+#ifdef VISUAL3D_DEB
cout << "Visual3d_Layer::End" << endl;
ptrLayer = (call_def_ptrLayer) MyCLayer.ptrLayer;
if (ptrLayer == NULL)
#ifdef TRACE_CALL
cout << "Visual3d_Layer::CLayer" << endl;
#endif
-#ifdef DEBUG
+#ifdef VISUAL3D_DEB
cout << "Visual3d_Layer::CLayer" << endl;
call_def_ptrLayer ptrLayer;
ptrLayer = (call_def_ptrLayer) MyCLayer.ptrLayer;
Handle(TDataStd_TreeNode) Node;
if (! L.FindAttribute(XCAFDoc::ShapeRefGUID(), Node) ||
! Node->HasFather()) {
+#ifdef XCAFDOC_DEB
cout<<"Error: XCAFDoc_ShapeTool, SetLabelNameByLink(): NO NODE"<<endl;
+#endif
return;
}
TCollection_AsciiString Entry;
Handle(Standard_Transient) XCAFDrivers::Factory(const Standard_GUID& aGUID) {
if(aGUID == XCAFSchemaID) {
+#ifdef XCAFDRIVERS_DEB
cout << "XCAFSchema : Plugin" << endl;
+#endif
static Handle(XCAFSchema) model_ss;
static Standard_Boolean IsInitialized = Standard_False;
if (! IsInitialized)
if(aGUID == XSStorageDriver)
{
+#ifdef XCAFDRIVERS_DEB
cout << "XCAFDrivers : Storage Plugin" << endl;
+#endif
static Handle(XCAFDrivers_DocumentStorageDriver) model_sd
= new XCAFDrivers_DocumentStorageDriver;
return model_sd;
}
if(aGUID == XSRetrievalDriver)
{
+#ifdef XCAFDRIVERS_DEB
cout << "XCAFDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (XCAFDrivers_DocumentRetrievalDriver) model_rd
= new XCAFDrivers_DocumentRetrievalDriver;
return model_rd;
continue;
// set style for all component from Next Usage Occurrence.
-#ifdef DEB
+#ifdef XCAFPRS_DEB
cout << "Set the style for SHUO next_usage-occurrance" << endl;
#endif
/*
TCollection_AsciiString str ( seq );
str += ".exec.op";
if ( ! rsc->Find ( str.ToCString() ) ) {
-#ifdef DEB
+#ifdef XSALGO_DEB
{
static Standard_Integer time = 0;
if ( ! time )
}
}
catch (Standard_Failure) {
-#ifdef DEB
+#ifdef XSALGO_DEB
cout << "Error: XSAlgo_AlgoContainer::ProcessShape(): Exception in ShapeFix::Shape" << endl;
Standard_Failure::Caught()->Print(cout); cout << endl;
#endif
Standard_Real DV = Abs (PUV1.Y() - PUV2.Y());
if ( DU/8. > (UL/6. - UF/6.) || DV/8. > (VL/6. - VF/6.) ) {
ShapeBuild_Edge().RemovePCurve(E,face);
-#ifdef DEBUG
+#ifdef XSALGO_DEB
cout<<"Removing pcuve periodic"<<endl;
#endif
return Standard_False;
if (!((Dist11 <= preci) && (Dist22 <= preci))) {
ShapeBuild_Edge().RemovePCurve(E,face);
-#ifdef DEBUG
+#ifdef XSALGO_DEB
cout<<"Removing pcurve points"<<endl;
#endif
return Standard_False;
else if ( TransientListBinder->NbTransients() > 1 ) {
resBinder->AddResult(TransientListBinder);
// resBinder->SetNext(TransientListBinder, Standard_True);
-#ifdef DEB
+#ifdef XSALGO_DEB
cout<<"Info: TransientListBinder created for splitted shape"<<endl;
}
else {
{
if (theGUID == XmlStorageDriver)
{
+#ifdef XMLDRIVERS_DEB
cout << "XmlDrivers : Storage Plugin" << endl;
+#endif
static Handle(XmlDrivers_DocumentStorageDriver) model_sd =
new XmlDrivers_DocumentStorageDriver
("Copyright: Open Cascade, 2001-2002"); // default copyright
if (theGUID == XmlRetrievalDriver)
{
+#ifdef XMLDRIVERS_DEB
cout << "XmlDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (XmlDrivers_DocumentRetrievalDriver) model_rd =
new XmlDrivers_DocumentRetrievalDriver ();
return model_rd;
void XmlDrivers_DocumentRetrievalDriver::PropagateDocumentVersion(
const Standard_Integer theDocVersion )
{
-#ifdef DEB
-// cout << "DocCurVersion =" << theDocVersion <<endl;
-#endif
XmlMDataStd::SetDocumentVersion(theDocVersion);
XmlMNaming::SetDocumentVersion(theDocVersion);
}
{
if (theGUID == XmlLStorageDriver)
{
+#ifdef XMLLDRIVERS_DEB
cout << "XmlLDrivers : Storage Plugin" << endl;
+#endif
static Handle(XmlLDrivers_DocumentStorageDriver) model_sd =
new XmlLDrivers_DocumentStorageDriver
("Copyright: Open Cascade, 2001-2002"); // default copyright
if (theGUID == XmlLRetrievalDriver)
{
+#ifdef XMLLDRIVERS_DEB
cout << "XmlLDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (XmlLDrivers_DocumentRetrievalDriver) model_rd =
new XmlLDrivers_DocumentRetrievalDriver ();
return model_rd;
struct tm *nowstruct;
if (time(&nowbin) == (time_t) - 1)
+ {
+#ifdef XMLLDRIVERS_DEB
cerr << "Storage ERROR : Could not get time of day from time()" << endl;
+#endif
+ }
nowstruct = localtime(&nowbin);
if (strftime(nowstr, SLENGTH, "%Y-%m-%d", nowstruct) == (size_t) 0)
+ {
+#ifdef XMLLDRIVERS_DEB
cerr << "Storage ERROR : Could not get string from strftime()" << endl;
+#endif
+ }
return nowstr;
}
void XmlLDrivers_DocumentRetrievalDriver::PropagateDocumentVersion(
const Standard_Integer theDocVersion )
{
-#ifdef DEB
-// cout << "DocCurVersion =" << theDocVersion <<endl;
-#endif
XmlMDataStd::SetDocumentVersion(theDocVersion);
}
#endif
return myRelocTable.Extent();
}
-#ifdef DEB
+#ifdef XMLLDRIVERS_DEB
cout << "First step failed" << endl; // No MessageDriver available
#endif
return -1; // error
// Paste
aDriver -> Paste (tAtt, pAtt, theRelocTable);
}
-#ifdef DEB
+#ifdef XMLMDF_DEB
else if (!UnsuppTypesMap().Contains (aType))
{
cout << "attribute driver for type "<< aType -> Name()<< " not found"<< endl;
else if (isBound == Standard_False)
theRelocTable.Bind (anID, tAtt);
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else
{
const TCollection_AsciiString anAsciiName = aName;
}
aByteArray->ChangeArray(hArr);
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMDataStd::DocumentVersion() <<endl;
-#endif
Standard_Boolean aDelta(Standard_False);
if(XmlMDataStd::DocumentVersion() > 2) {
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else if(XmlMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
XmlObjMgt::GetExtendedString( *aCurElement, aValueStr );
aExtStringArray->SetValue( aLastInd, aValueStr );
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMDataStd::DocumentVersion() <<endl;
-#endif
Standard_Boolean aDelta(Standard_False);
if(XmlMDataStd::DocumentVersion() > 2) {
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else if(XmlMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
if(aPackedMap->ChangeMap(aHMap))
Ok = Standard_True;
}
- //
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMDataStd::DocumentVersion() <<endl;
-#endif
if(Ok) {
Standard_Boolean aDelta(Standard_False);
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else if(XmlMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
anIntArray->SetValue(ind, aValue);
}
}
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMDataStd::DocumentVersion() <<endl;
-#endif
Standard_Boolean aDelta(Standard_False);
if(XmlMDataStd::DocumentVersion() > 2) {
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else if(XmlMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
TCollection_AsciiString aVal(aValueStr,'?');
Standard_Integer aLen = aVal.IntegerValue();
-#ifdef DEB
-// XmlObjMgt_DOMString aValStr = aCurElement->getAttribute(::Value());
-// const char* aS = aValStr.GetString();
-// cout << " Key = " << TCollection_AsciiString(aKey, '?') << " aValue = " << aS << endl;
-#endif
-
TCollection_AsciiString aValueString = aCurElement->getAttribute(::Value());
Handle(TColStd_HArray1OfInteger) aValue = BuildIntArray(aValueString, aLen);
if(aValue.IsNull()) {
}
TCollection_AsciiString aVal(aValueStr,'?');
Standard_Integer aLen = aVal.IntegerValue();
-#ifdef DEB
-// XmlObjMgt_DOMString aValStr = aCurElement->getAttribute(::Value());
-// const char* aS = aValStr.GetString();
-// cout << " Key = " << TCollection_AsciiString(aKey, '?') << " aValue = " <<aS<<endl;
-#endif
TCollection_AsciiString aValueString = aCurElement->getAttribute(::Value());
Handle(TColStd_HArray1OfInteger) aValue = BuildIntArray(aValueString, aLen);
if(aValue.IsNull()) {
aRealArray->SetValue(ind, aValue);
}
}
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMDataStd::DocumentVersion() <<endl;
-#endif
Standard_Boolean aDelta(Standard_False);
if(XmlMDataStd::DocumentVersion() > 2) {
else
aDelta = (Standard_Boolean)aDeltaValue;
}
-#ifdef DEB
+#ifdef XMLMDATASTD_DEB
else if(XmlMDataStd::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
#endif
}
aNgName.Index(aNb);
//
-#ifdef DEB
- //cout << "CurDocVersion = " << XmlMNaming::DocumentVersion() <<endl;
-#endif
if(XmlMNaming::DocumentVersion() > 3) {
XmlObjMgt_DOMString aDomEntry = anElem.getAttribute(::ContextLabelString());
if (aDomEntry != NULL)
if (anEntry.Length() > 0) {
TDF_Tool::Label(aNg->Label().Data(), anEntry, tLab, Standard_True);
aNgName.ContextLabel(tLab);
-#ifdef DEB
+#ifdef XMLMNAMING_DEB
cout << "Retrieving Context Label = " << anEntry.ToCString() <<endl;
#endif
}
}
-#ifdef DEB
+#ifdef XMLMNAMING_DEB
else
cout << "Retrieving Context Label is NULL" <<endl;
#endif
}
// or. end
}
-#ifdef DEB
+#ifdef XMLMNAMING_DEB
else if(XmlMNaming::DocumentVersion() == -1)
cout << "Current DocVersion field is not initialized. " <<endl;
else
XmlObjMgt_DOMString aDOMString;
XmlObjMgt::SetTagEntryString (aDOMString, anEntry);
anElem.setAttribute(::ContextLabelString(), aDOMString);
-#ifdef DEB
+#ifdef XMLMNAMING_DEB
cout << "XmlMNaming_NamingDriver::Store: ContextLabel Entry = " << anEntry << endl;
if (aDOMString != NULL)
{
// The location is not identity
if( myLocations == 0 )
{
-#ifdef DEB
+#ifdef XMLMXCAFDOC_DEB
cout<<"Pointer to LocationSet is NULL\n";
#endif
return;
{
if(aGUID == XmlStorageDriver)
{
+#ifdef XMLTOBJDRIVERS_DEB
cout << "XmlTObjDrivers : Storage Plugin" << endl;
+#endif
static Handle(XmlTObjDrivers_DocumentStorageDriver) model_sd
= new XmlTObjDrivers_DocumentStorageDriver
("Copyright: Open CASCADE 2004"); // default copyright
if(aGUID == XmlRetrievalDriver)
{
+#ifdef XMLTOBJDRIVERS_DEB
cout << "XmlTObjDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (XmlTObjDrivers_DocumentRetrievalDriver) model_rd
= new XmlTObjDrivers_DocumentRetrievalDriver;
return model_rd;
{
if(aGUID == XSStorageDriver)
{
+#ifdef XMLXCAFDRIVERS_DEB
cout << "XmlXCAFDrivers : Storage Plugin" << endl;
+#endif
static Handle(XmlXCAFDrivers_DocumentStorageDriver) model_sd
= new XmlXCAFDrivers_DocumentStorageDriver
("Copyright: Open Cascade, 2001-2002"); // default copyright
}
if(aGUID == XSRetrievalDriver)
{
+#ifdef XMLXCAFDRIVERS_DEB
cout << "XmlXCAFDrivers : Retrieval Plugin" << endl;
+#endif
static Handle (XmlXCAFDrivers_DocumentRetrievalDriver) model_rd
= new XmlXCAFDrivers_DocumentRetrievalDriver;
return model_rd;
F.Value(b,fb);
fb-=K;
}
-#ifdef DEB
+#ifdef MATH_DEB
cout<<" Non Convergence dans math_FunctionRoots.cxx "<<endl;
#endif
}
-puts "========"\r
-puts "OCC24533"\r
-puts "========"\r
-puts ""\r
-####################################################\r
-## Use 0 to check null handle instead of UndefinedHandleAccess\r
-####################################################\r
-\r
-pload QAcommands\r
-\r
-OCC24533\r
+puts "========"
+puts "OCC24533"
+puts "========"
+puts ""
+####################################################
+## Use 0 to check null handle instead of UndefinedHandleAccess
+####################################################
+
+pload QAcommands
+
+OCC24533
-puts "============"\r
-puts "OCC23884"\r
-puts "============"\r
-puts ""\r
-######################################################\r
-# Boolean Fuse between two faces fails\r
-######################################################\r
-\r
-restore [locate_data_file bug23884_fz72] b1\r
-restore [locate_data_file bug23884_fz124] b2\r
-\r
-bop b1 b2\r
-bopfuse result\r
-\r
-set square 2415.65\r
-set 2dviewer 0\r
-\r
-\r
-\r
-\r
-\r
+puts "============"
+puts "OCC23884"
+puts "============"
+puts ""
+######################################################
+# Boolean Fuse between two faces fails
+######################################################
+
+restore [locate_data_file bug23884_fz72] b1
+restore [locate_data_file bug23884_fz124] b2
+
+bop b1 b2
+bopfuse result
+
+set square 2415.65
+set 2dviewer 0
+
+
+
+
+
-puts "========="\r
-puts "OCC24612"\r
-puts "========="\r
-puts ""\r
-###########################################################\r
-# Wrong pcurve of the section curve\r
-###########################################################\r
-\r
-set MaxTol 5.0e-7\r
-set NbCurv_OK 1\r
-restore [locate_data_file bug24612_b1.brep] b1\r
-restore [locate_data_file bug24612_b2.brep] b2\r
-\r
-mksurface s1 b1\r
-bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp\r
-\r
-dval U1f_exp\r
-dval U1l_exp\r
-dval V1f_exp\r
-dval V1l_exp\r
-\r
-set log [bopcurves b1 b2 -2d]\r
-\r
-regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv\r
-\r
-if {${NbCurv} != ${NbCurv_OK}} {\r
- puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found."\r
-}\r
-\r
-if {${Toler} > ${MaxTol}} {\r
- puts "Error: Tolerance is too big!"\r
-}\r
-\r
-#Theoretically, c2d1_1 must cover V-diapason of surface s1 fully.\r
-\r
-set log [dump c2d1_1]\r
-\r
-regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles\r
-puts "Degree=${Degree}"\r
-puts "Poles=${Poles}"\r
-puts "KnotsPoles=${KnotsPoles}"\r
-puts ""\r
-\r
-set Pole 1\r
-set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"\r
-regexp ${exp_string} ${log} full U_begin V_begin\r
-\r
-puts "Pole=${Pole}"\r
-puts "U_begin=${U_begin}"\r
-puts "V_begin=${V_begin}"\r
-dset V_begin ${V_begin}\r
-puts ""\r
-\r
-set Pole ${Poles}\r
-set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"\r
-regexp ${exp_string} ${log} full U_end V_end\r
-\r
-puts "Pole=${Pole}"\r
-puts "U_end=${U_end}"\r
-puts "V_end=${V_end}"\r
-dset V_end ${V_end}\r
-puts ""\r
-\r
-set delta_f [dval V1l_exp-V_begin]\r
-\r
-#ATTENTION!!! V_begin must be strictly equal V1l_exp (without any tolerance)\r
-if {${delta_f} != 0} {\r
- puts "Error: Bad value. V_begin = [dval V_begin], Vlast = [dval V1l_exp]."\r
-} else {\r
- puts "OK: Good value. V_begin matches with Vlast of surface."\r
-}\r
-\r
-puts ""\r
-\r
-set delta_l [dval V1f_exp-V_end]\r
-\r
-#ATTENTION!!! V_end must be strictly equal V1f_exp (without any tolerance)\r
-if {${delta_l} != 0} {\r
- puts "Error: Bad value. V_end = [dval V_end], Vfirst = [dval V1f_exp]."\r
-} else {\r
- puts "OK: Good value. V_end matches with Vfirst of surface."\r
-}\r
+puts "========="
+puts "OCC24612"
+puts "========="
+puts ""
+###########################################################
+# Wrong pcurve of the section curve
+###########################################################
+
+set MaxTol 5.0e-7
+set NbCurv_OK 1
+restore [locate_data_file bug24612_b1.brep] b1
+restore [locate_data_file bug24612_b2.brep] b2
+
+mksurface s1 b1
+bounds s1 U1f_exp U1l_exp V1f_exp V1l_exp
+
+dval U1f_exp
+dval U1l_exp
+dval V1f_exp
+dval V1l_exp
+
+set log [bopcurves b1 b2 -2d]
+
+regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
+
+if {${NbCurv} != ${NbCurv_OK}} {
+ puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found."
+}
+
+if {${Toler} > ${MaxTol}} {
+ puts "Error: Tolerance is too big!"
+}
+
+#Theoretically, c2d1_1 must cover V-diapason of surface s1 fully.
+
+set log [dump c2d1_1]
+
+regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles
+puts "Degree=${Degree}"
+puts "Poles=${Poles}"
+puts "KnotsPoles=${KnotsPoles}"
+puts ""
+
+set Pole 1
+set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
+regexp ${exp_string} ${log} full U_begin V_begin
+
+puts "Pole=${Pole}"
+puts "U_begin=${U_begin}"
+puts "V_begin=${V_begin}"
+dset V_begin ${V_begin}
+puts ""
+
+set Pole ${Poles}
+set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)"
+regexp ${exp_string} ${log} full U_end V_end
+
+puts "Pole=${Pole}"
+puts "U_end=${U_end}"
+puts "V_end=${V_end}"
+dset V_end ${V_end}
+puts ""
+
+set delta_f [dval V1l_exp-V_begin]
+
+#ATTENTION!!! V_begin must be strictly equal V1l_exp (without any tolerance)
+if {${delta_f} != 0} {
+ puts "Error: Bad value. V_begin = [dval V_begin], Vlast = [dval V1l_exp]."
+} else {
+ puts "OK: Good value. V_begin matches with Vlast of surface."
+}
+
+puts ""
+
+set delta_l [dval V1f_exp-V_end]
+
+#ATTENTION!!! V_end must be strictly equal V1f_exp (without any tolerance)
+if {${delta_l} != 0} {
+ puts "Error: Bad value. V_end = [dval V_end], Vfirst = [dval V1f_exp]."
+} else {
+ puts "OK: Good value. V_end matches with Vfirst of surface."
+}
-\r
-puts "========================"\r
-puts "OCC137"\r
-puts "========================" \r
-###############################################################\r
-#Patch description:\r
-#\r
-#MIT010717 : 3D selection management\r
-#>>> MIT010717 : Selection management \r
-#\r
-# * Package OpenGl (OpenGl_execstruct.c) \r
-#\r
-# @ Avoid drawing quality problem on selected face, \r
-# enable/disable Z offset on highlighted faces. \r
-#\r
-#>>> MIT010717 : drawing management \r
-#\r
-# * Package OpenGl (OpenGl_indexpolygon.c, ...) \r
-#\r
-# @ Avoid to undraw faces with confused points \r
-###############################################################\r
-puts "========================"\r
-\r
-vinit\r
-box b 10 10 10\r
-vdisplay b\r
-vfit\r
-vsetdispmode 1\r
-\r
-puts "Only bottom face should be highlighted."\r
-\r
-vselmode 4 1\r
-\r
-OCC137 1\r
-OCC137_z\r
-\r
-set x_coord 105\r
-set y_coord 348\r
-\r
-vmoveto $x_coord $y_coord\r
-\r
-set x_coord 105\r
-set y_coord 340\r
-\r
-checkcolor $x_coord $y_coord 0 1 1\r
-\r
-set x_coord 105\r
-set y_coord 340\r
-vviewparams -scale 60.6309 -proj 0.592163 -0.60038 -0.537482 -up 0.369921 -0.390032 0.843228 -at 3.29057034725635 6.73314999296002 6.55157729015654\r
-\r
-checkcolor $x_coord $y_coord 0.78 0.54 0.09\r
- \r
-set only_screen 1\r
+
+puts "========================"
+puts "OCC137"
+puts "========================"
+###############################################################
+#Patch description:
+#
+#MIT010717 : 3D selection management
+#>>> MIT010717 : Selection management
+#
+# * Package OpenGl (OpenGl_execstruct.c)
+#
+# @ Avoid drawing quality problem on selected face,
+# enable/disable Z offset on highlighted faces.
+#
+#>>> MIT010717 : drawing management
+#
+# * Package OpenGl (OpenGl_indexpolygon.c, ...)
+#
+# @ Avoid to undraw faces with confused points
+###############################################################
+puts "========================"
+
+vinit
+box b 10 10 10
+vdisplay b
+vfit
+vsetdispmode 1
+
+puts "Only bottom face should be highlighted."
+
+vselmode 4 1
+
+OCC137 1
+OCC137_z
+
+set x_coord 105
+set y_coord 348
+
+vmoveto $x_coord $y_coord
+
+set x_coord 105
+set y_coord 340
+
+checkcolor $x_coord $y_coord 0 1 1
+
+set x_coord 105
+set y_coord 340
+vviewparams -scale 60.6309 -proj 0.592163 -0.60038 -0.537482 -up 0.369921 -0.390032 0.843228 -at 3.29057034725635 6.73314999296002 6.55157729015654
+
+checkcolor $x_coord $y_coord 0.78 0.54 0.09
+
+set only_screen 1
-\r
-puts "========================"\r
-puts "OCC137"\r
-puts "========================" \r
-###############################################################\r
-#Patch description:\r
-#\r
-#MIT010717 : 3D selection management\r
-#>>> MIT010717 : Selection management \r
-#\r
-# * Package OpenGl (OpenGl_execstruct.c) \r
-#\r
-# @ Avoid drawing quality problem on selected face, \r
-# enable/disable Z offset on highlighted faces. \r
-#\r
-#>>> MIT010717 : drawing management \r
-#\r
-# * Package OpenGl (OpenGl_indexpolygon.c, ...) \r
-#\r
-# @ Avoid to undraw faces with confused points \r
-###############################################################\r
-puts "========================"\r
-\r
-vinit\r
-box b 10 10 10\r
-vdisplay b\r
-vfit\r
-vsetdispmode 1\r
-\r
-puts "Only bottom face should be highlighted."\r
-\r
-OCC137 1\r
-OCC137_z\r
-\r
-vselmode 4 1\r
-\r
-set x_coord 105\r
-set y_coord 348\r
-\r
-vmoveto $x_coord $y_coord\r
-\r
-set x_coord 105\r
-set y_coord 340\r
-\r
-checkcolor $x_coord $y_coord 0 1 1\r
-\r
-vviewparams -scale 60.6309 -proj 0.592163 -0.60038 -0.537482 -up 0.369921 -0.390032 0.843228 -at 3.29057034725635 6.73314999296002 6.55157729015654\r
-set x_coord 105\r
-set y_coord 340\r
-\r
-checkcolor $x_coord $y_coord 0.78 0.54 0.09\r
-\r
-set only_screen 1\r
+
+puts "========================"
+puts "OCC137"
+puts "========================"
+###############################################################
+#Patch description:
+#
+#MIT010717 : 3D selection management
+#>>> MIT010717 : Selection management
+#
+# * Package OpenGl (OpenGl_execstruct.c)
+#
+# @ Avoid drawing quality problem on selected face,
+# enable/disable Z offset on highlighted faces.
+#
+#>>> MIT010717 : drawing management
+#
+# * Package OpenGl (OpenGl_indexpolygon.c, ...)
+#
+# @ Avoid to undraw faces with confused points
+###############################################################
+puts "========================"
+
+vinit
+box b 10 10 10
+vdisplay b
+vfit
+vsetdispmode 1
+
+puts "Only bottom face should be highlighted."
+
+OCC137 1
+OCC137_z
+
+vselmode 4 1
+
+set x_coord 105
+set y_coord 348
+
+vmoveto $x_coord $y_coord
+
+set x_coord 105
+set y_coord 340
+
+checkcolor $x_coord $y_coord 0 1 1
+
+vviewparams -scale 60.6309 -proj 0.592163 -0.60038 -0.537482 -up 0.369921 -0.390032 0.843228 -at 3.29057034725635 6.73314999296002 6.55157729015654
+set x_coord 105
+set y_coord 340
+
+checkcolor $x_coord $y_coord 0.78 0.54 0.09
+
+set only_screen 1
-puts "============"\r
-puts "CR24901"\r
-puts "============"\r
-puts ""\r
-#######################################################################\r
-# Visualization - Incorrect area filled with capping color\r
-#######################################################################\r
-\r
-vinit View1\r
-box b 10 10 10\r
-vdisplay b\r
-vsetdispmode 1\r
-\r
-vclipplane create pln1\r
-vclipplane set pln1 object b\r
-vclipplane change pln1 equation 0 1 0 -5\r
-vclipplane change pln1 capping on\r
-vfit\r
-vmoveto 304 146\r
-\r
-set x_coord 304\r
-set y_coord 146\r
-checkcolor $x_coord $y_coord 0 1 1\r
-if { $stat != 1 } {\r
- puts "Error : Highlighting is broken."\r
-}\r
-\r
-set only_screen 1\r
+puts "============"
+puts "CR24901"
+puts "============"
+puts ""
+#######################################################################
+# Visualization - Incorrect area filled with capping color
+#######################################################################
+
+vinit View1
+box b 10 10 10
+vdisplay b
+vsetdispmode 1
+
+vclipplane create pln1
+vclipplane set pln1 object b
+vclipplane change pln1 equation 0 1 0 -5
+vclipplane change pln1 capping on
+vfit
+vmoveto 304 146
+
+set x_coord 304
+set y_coord 146
+checkcolor $x_coord $y_coord 0 1 1
+if { $stat != 1 } {
+ puts "Error : Highlighting is broken."
+}
+
+set only_screen 1
puts ""
#######################################################################
# Cappings have gray tint if setting color with vclipplane command.
-#######################################################################\r
-box b 100 100 100\r
-vinit\r
-vsetdispmode 1\r
-vdisplay b\r
-vclipplane create pln1\r
-vclipplane change pln1 equation 0 0 -1 20\r
-vclipplane set pln1 object b\r
-vclipplane change pln1 capping on\r
-vclipplane change pln1 capping color 1.0 1.0 1.0\r
+#######################################################################
+box b 100 100 100
+vinit
+vsetdispmode 1
+vdisplay b
+vclipplane create pln1
+vclipplane change pln1 equation 0 0 -1 20
+vclipplane set pln1 object b
+vclipplane change pln1 capping on
+vclipplane change pln1 capping color 1.0 1.0 1.0
vtop
vfit