//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES);
- if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; }
+ if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL;}
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID())
- { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; }
+ { MESSAGE ( "Chamfer Driver is NULL!!!" ); return NULL; }
GEOMImpl_IChamfer aCI (aFunction);
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
- if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; }
+ if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;}
aCI.SetShape(aRefShape);
aCI.SetD1(theD1);
//Add a new Chamfer function
Handle(GEOM_Function) aFunction =
aChamfer->AddFunction(GEOMImpl_ChamferDriver::GetID(), CHAMFER_SHAPE_EDGES_AD);
- if (aFunction.IsNull()) { return NULL; cout << "Edges Function is NULL!!!" << endl; }
+ if (aFunction.IsNull()) { MESSAGE ( "Edges Function is NULL!!!" ); return NULL; }
//Check if the function is set correctly
if (aFunction->GetDriverGUID() != GEOMImpl_ChamferDriver::GetID())
- { return NULL; cout << "Chamfer Driver is NULL!!!" << endl; }
+ { MESSAGE("Chamfer Driver is NULL!!!"); return NULL;}
GEOMImpl_IChamfer aCI (aFunction);
Handle(GEOM_Function) aRefShape = theShape->GetLastFunction();
- if (aRefShape.IsNull()) { return NULL; cout << "Shape is NULL!!!" << endl; }
+ if (aRefShape.IsNull()) { MESSAGE ("Shape is NULL!!!"); return NULL;}
aCI.SetShape(aRefShape);
aCI.SetD(theD);
ShapeAnalysis_Edge sae;
while(1) {
if(!aMapVertEdge1.Contains(VS1))
- cout<<" FillForOtherEdges: map aMapVertEdge1 not contains key VS1"<<endl;
+ MESSAGE (" FillForOtherEdges: map aMapVertEdge1 not contains key VS1");
const TopTools_ListOfShape& aList1 = aMapVertEdge1.FindFromKey(VS1);
//TopoDS_Shape E1next;
TopTools_ListIteratorOfListOfShape anIter1(aList1);
}
//E1next = anIter1.Value();
if(!aMapVertEdge2.Contains(VS2))
- cout<<" FillForOtherEdges: map aMapVertEdge2 not contains key VS2"<<endl;
+ MESSAGE (" FillForOtherEdges: map aMapVertEdge2 not contains key VS2");
const TopTools_ListOfShape& aList2 = aMapVertEdge2.FindFromKey(VS2);
//TopoDS_Shape E2next;
TopTools_ListIteratorOfListOfShape anIter2(aList2);
Standard_ConstructionError::Raise("FindNextPairOfFaces: Can not find edge in map");
}
if(!FF.Contains(E1))
- cout<<" FindNextPairOfFaces: map FF not contains key E1"<<endl;
+ MESSAGE (" FindNextPairOfFaces: map FF not contains key E1");
const TopoDS_Shape& E2 = FF.FindFromKey(E1);
TopExp_Explorer anExpV;
anExpV.Init( E1, TopAbs_VERTEX );
}
if(!aMapEdgeFaces1.Contains(E1))
- cout<<" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1"<<endl;
+ MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces1 not contains key E1");
const TopTools_ListOfShape& aList1 = aMapEdgeFaces1.FindFromKey(E1);
if(aList1.Extent()<2)
continue;
continue;
if(!FF.Contains(aCurFace))
- cout<<" FindNextPairOfFaces: map FF not contains key aCurFace"<<endl;
+ MESSAGE (" FindNextPairOfFaces: map FF not contains key aCurFace");
const TopoDS_Shape& F2 = FF.FindFromKey(aCurFace);
if(!aMapEdgeFaces2.Contains(E2))
- cout<<" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2"<<endl;
+ MESSAGE (" FindNextPairOfFaces: map aMapEdgeFaces2 not contains key E2");
const TopTools_ListOfShape& aList2 = aMapEdgeFaces2.FindFromKey(E2);
if(aList2.Extent()<2) {
if(aCI) delete aCI;
if(!V1.IsSame(V1new)) {
V1 = V1new;
P1 = BRep_Tool::Pnt(V1);
- cout<<" replace V1"<<endl;
+ MESSAGE (" replace V1");
}
else
- cout<<" not replace V1"<<endl;
+ MESSAGE (" not replace V1");
if(!V2.IsSame(V2new)) {
V2 = V2new;
P2 = BRep_Tool::Pnt(V2);
- cout<<" replace V2"<<endl;
+ MESSAGE (" replace V2");
}
else
- cout<<" not replace V2"<<endl;
+ MESSAGE (" not replace V2");
TopTools_IndexedDataMapOfShapeListOfShape aMapVertFaces1;
TopExp::MapShapesAndAncestors(S1, TopAbs_VERTEX, TopAbs_FACE, aMapVertFaces1);
TopExp::MapShapesAndAncestors(S2, TopAbs_VERTEX, TopAbs_FACE, aMapVertFaces2);
if(!aMapVertFaces1.Contains(V1))
- cout<<" FindFirstPairFaces: map aMapVertFaces1 not contains key V1"<<endl;
+ MESSAGE (" FindFirstPairFaces: map aMapVertFaces1 not contains key V1");
const TopTools_ListOfShape& aList1 = aMapVertFaces1.FindFromKey(V1);
TopTools_ListIteratorOfListOfShape anIter1(aList1);
FS1 = anIter1.Value();
TColgp_SequenceOfPnt Ps;
TopTools_SequenceOfShape Fs;
if(!aMapVertFaces2.Contains(V2))
- cout<<" FindFirstPairFaces: map aMapVertFaces2 not contains key V2"<<endl;
+ MESSAGE (" FindFirstPairFaces: map aMapVertFaces2 not contains key V2");
const TopTools_ListOfShape& aList2 = aMapVertFaces2.FindFromKey(V2);
TopTools_ListIteratorOfListOfShape anIter2(aList2);
for(; anIter2.More(); anIter2.Next()) {
B.MakeCompound(aComp);
for(i=1 ; i<nbBases; i++) {
- cout<<"Make pipe between sections "<<i<<" and "<<i+1<<endl;
+ MESSAGE ("Make pipe between sections "<<i<<" and "<<i+1);
TopoDS_Shape aShBase1 = Bases.Value(i);
TopoDS_Shape aShBase2 = Bases.Value(i+1);
TopExp_Explorer anExp;
FindFirstPairFaces(aShBase1, aShBase2, V1, V2, FS1, FS2);
FF.Add(FS1,FS2);
- cout<<" first pair of corresponding faces is found"<<endl;
+ MESSAGE (" first pair of corresponding faces is found");
// add pairs of edges and vertexes to FF
bool stat = FillCorrespondingEdges(FS1, FS2, V1, V2, FF);
if(aCI) delete aCI;
Standard_ConstructionError::Raise("Can not create correct pipe");
}
- cout<<" correspondences for subshapes of first pair of faces is found"<<endl;
+ MESSAGE (" correspondences for subshapes of first pair of faces is found");
FindNextPairOfFaces(FS1, aMapEdgeFaces1, aMapEdgeFaces2, FF, aCI);
- cout<<" other correspondences is found, make pipe for all pairs of faces"<<endl;
+ MESSAGE (" other correspondences is found, make pipe for all pairs of faces");
// make pipe for each pair of faces
// auxilary map vertex->edge for created pipe edges
//if(nbff!=3) continue;
- cout<<" make pipe for "<<nbff<<" face"<<endl;
+ MESSAGE (" make pipe for "<<nbff<<" face");
Handle(Geom_Surface) S1 = BRep_Tool::Surface(TopoDS::Face(F1));
if(S1->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
TopoDS_Edge E1 = TopoDS::Edge(anExpE.Current());
//nbee++;
if(!FF.Contains(E1))
- cout<<"map FF not contains key E1"<<endl;
+ MESSAGE ("map FF not contains key E1");
if(VPE.Contains(E1)) {
aNewFs.Append(VPE.FindFromKey(E1));
#ifdef _DEBUG_
- cout<<" using existed face"<<endl;
+ MESSAGE (" using existed face");
#endif
continue;
}
TopoDS_Vertex V1 = sae.FirstVertex(E1);
TopoDS_Vertex V2 = sae.LastVertex(E1);
if(!FF.Contains(V1))
- cout<<"map FF not contains key V1"<<endl;
+ MESSAGE ("map FF not contains key V1");
if(!FF.Contains(V2))
- cout<<"map FF not contains key V2"<<endl;
+ MESSAGE ("map FF not contains key V2");
TopoDS_Vertex V3 = TopoDS::Vertex(FF.FindFromKey(V2));
TopoDS_Vertex V4 = TopoDS::Vertex(FF.FindFromKey(V1));
TopoDS_Vertex Vtmp = sae.FirstVertex(E3);
BS = GF.Surface();
}
catch(...) {
- cout<<" can not create BSplineSurface - create Bezier"<<endl;
+ MESSAGE (" can not create BSplineSurface - create Bezier");
int NbP=26;
TColgp_Array2OfPnt Points(1,NbP,1,NbP);
double fp1,lp1,fp2,lp2;
aSewing->Add(anExp.Current());
}
aSewing->Perform();
- cout<<" shell for face "<<nbff<<" is created"<<endl;
+ MESSAGE (" shell for face "<<nbff<<" is created");
const TopoDS_Shape aSewShape = aSewing->SewedShape();
//BRepTools::Write(aSewShape,"/dn02/users_Linux/skl/work/Bugs/14857/sew.brep");
if( aSewShape.ShapeType() == TopAbs_SHELL ) {
B.MakeSolid(aSolid);
B.Add(aSolid,aShell);
B.Add(aComp,aSolid);
- cout<<" solid for face "<<nbff<<" is created"<<endl;
+ MESSAGE (" solid for face "<<nbff<<" is created");
}
else {
B.Add(aComp,aShell);
- cout<<" solid for face "<<nbff<<" is not created"<<endl;
+ MESSAGE (" solid for face "<<nbff<<" is not created");
}
}
else {
B.Add(aComp,aShell);
- cout<<" solid for face "<<nbff<<" is not created"<<endl;
+ MESSAGE (" solid for face "<<nbff<<" is not created");
}
//cout<<" solid for face "<<nbff<<" is created"<<endl;
TopoDS_Shape aShapePath = aRefPath->GetValue();
if (aShapePath.IsNull()) {
- cout<<"Driver : path is null"<<endl;
+ MESSAGE ("Driver : path is null");
if(aCI) delete aCI;
Standard_NullObject::Raise("MakePipe aborted : null path argument");
}