//
// This file is part of Open CASCADE Technology software library.
//
-// This library is free software; you can redistribute it and / or modify it
-// under the terms of the GNU Lesser General Public version 2.1 as published
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
#define MGhc3 Handle(Geom_Curve)
#define MGhc2 Handle(Geom2d_Curve)
-#ifdef DEB
+#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepBuild_GettraceSPS();
extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
Standard_EXPORT void debsplitse(const Standard_Integer) {}
}
#include <BRep_Tool.hxx>
+#include <TopOpeBRepDS_ShapeShapeInterference.hxx>
//-----------------------------------------------------------------------
static Standard_Boolean FUN_EstaEE(const TopoDS_Edge& E, const TopAbs_State sta, const TopoDS_Edge& EE)
//-----------------------------------------------------------------------
const TopOpeBRepDS_DataStructure& BDS = myDataStructure->DS();
Standard_Integer i,n = BDS.NbSectionEdges();
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (TopOpeBRepDS_GettraceDSNC() && !mySplitSectionEdgesDone)
cout<<"TopOpeBRepBuild_Builder::SSE : compute "<<n<<" section edges"<<endl;
#endif
Standard_Integer iE = myDataStructure->Shape(E);
Standard_Integer rE = BDS.AncestorRank(E);
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Boolean tSPS = GtraceSPS(E,iE); if (tSPS) debsplitsemess(iE); Standard_Integer DEBiESD = 1;
#endif
Standard_Integer iESD = myDataStructure->Shape(ESD);
const TopTools_ListOfShape& LESDspon = Splits(ESD,TopAbs_ON);
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (tSPS) {
TCollection_AsciiString str("# edge ");str=str+iE+" sd3d edge "+iESD;
TCollection_AsciiString stru(str.Length(),'-');
TopOpeBRepBuild_ListOfShapeListOfShape thelist;
if (!E1b) MEIN.Bind(E1, thelist);
TopOpeBRepBuild_ListOfShapeListOfShape& LE1loslos = MEIN.ChangeFind(E1);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nLE1 = LE1loslos.Extent();
#endif
TopOpeBRepBuild_ListOfShapeListOfShape thelist2;
if (!E2b) MEIN.Bind(E2,thelist2);
TopOpeBRepBuild_ListOfShapeListOfShape& LE2loslos = MEIN.ChangeFind(E2);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nLE2 = LE2loslos.Extent();
#endif
for (i = 1; i <= n; i++) { // 3
const TopoDS_Edge& E = TopoDS::Edge(BDS.SectionEdge(i));
if(E.IsNull()) continue;
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Integer iE = myDataStructure->Shape(E);
// Standard_Integer rE = GShapeRank(E);
Standard_Boolean tSPS = GtraceSPS(E,iE);
if (isbMEOUT) {
const TopTools_ListOfShape& LEOUT = MEOUT.Find(E);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nOUT = LEOUT.Extent();
#endif
GCopyList(LEOUT,LEspon);
if (isbMEIN) {
const TopOpeBRepBuild_ListOfShapeListOfShape& loslos = MEIN.Find(E);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nloslos = loslos.Extent();
#endif
for (TopOpeBRepBuild_ListIteratorOfListOfShapeListOfShape it(loslos); it.More(); it.Next()) {
const TopTools_ListOfShape& los = it.Value().List();
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nlos = los.Extent();
#endif
GCopyList(los,LEspon);
BRep_Builder BB;
for (i = 1; i <= n; i++) { // 4
const TopoDS_Edge& E = TopoDS::Edge(BDS.SectionEdge(i)); if(E.IsNull()) continue;
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Integer idebE; Standard_Boolean tSPS = GtraceSPS(E,idebE); if (tSPS) debsplitsemess(idebE);
#endif
const TopTools_ListOfShape& lesd = BDS.ShapeSameDomain(E);
if (lesd.IsEmpty()) continue;
Standard_Integer iE = BDS.Shape(E);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer rE = BDS.AncestorRank(E);
#endif
Standard_Integer RE = BDS.SameDomainRef(E);
TopTools_ListOfShape lF; TopTools_ListIteratorOfListOfShape itlesd;
for(itlesd.Initialize(lesd);itlesd.More();itlesd.Next()) {
const TopoDS_Edge& esd = TopoDS::Edge(itlesd.Value());
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iesd = BDS.Shape(esd);
#endif
const TopTools_ListOfShape& lf = FDSCNX_EdgeConnexitySameShape(esd,myDataStructure);
GCopyList(lf,lF);
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer nlF = lF.Extent();
#endif
TopoDS_Edge& eon = TopoDS::Edge(itlon.Value());
Standard_Real f,l; Standard_Boolean hasPC = FC2D_HasCurveOnSurface(eon,F);
if (hasPC) continue;
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (TopOpeBRepTool_GettraceC2D()) {
cout<<"\n#TopOpeBRepBuild_Builder::SSE : hasPC = 0 ES"<<i<<" E"<<idebE<<" sur F"<<iF<<endl;
cout<<"tsee s "<<iF<<" "<<idebE<<";"<<endl;
Standard_Boolean isface = (FOR.ShapeType() == TopAbs_FACE);
if (!isface) continue;
const TopoDS_Face& FF = TopoDS::Face(FOR);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iFF = BDS.Shape(FF);
#endif
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(FF); Standard_Integer nLI = LI.Extent();
if (nLI == 0) continue;
for (TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); ILI.More(); ILI.Next() ) {
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value());
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value()));
if (SSI.IsNull()) continue;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
if (ST != TopOpeBRepDS_FACE) continue;
TopAbs_ShapeEnum shab = TFE.ShapeBefore(),shaa = TFE.ShapeAfter();
if (shaa != TopAbs_FACE || shab != TopAbs_FACE) continue;
const TopoDS_Face& FS = TopoDS::Face( myDataStructure->Shape(SI));
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iFS = myDataStructure->Shape(FS);
#endif
Standard_Boolean FSisper = FUN_periodicS(FS);
if (!FSisper) continue;
const TopoDS_Edge& EG = TopoDS::Edge(myDataStructure->Shape(GI));
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iEG = myDataStructure->Shape(EG);
#endif
Standard_Boolean isrest = myDataStructure->DS().IsSectionEdge(EG); if (!isrest) continue;
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Real tolE = BRep_Tool::Tolerance(EG);
#endif
Standard_Boolean haspc = FC2D_HasCurveOnSurface(EG,FS); if (haspc) continue;
Standard_Boolean isface = (FOR.ShapeType() == TopAbs_FACE);
if (!isface) continue;
const TopoDS_Face& FF = TopoDS::Face(FOR);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iFF = BDS.Shape(FF);
#endif
Standard_Boolean FFuper,FFvper; Standard_Boolean FFisper = FUN_periodic(FF,FFuper,FFvper);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(FF); Standard_Integer nLI = LI.Extent();
if (nLI == 0) continue;
for (TopOpeBRepDS_ListIteratorOfListOfInterference ILI(LI); ILI.More(); ILI.Next() ) {
- const Handle(TopOpeBRepDS_ShapeShapeInterference)& SSI = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value());
+ Handle(TopOpeBRepDS_ShapeShapeInterference) SSI (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(ILI.Value()));
if (SSI.IsNull()) continue;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
if (ST != TopOpeBRepDS_FACE) continue;
if (GB == 1) continue;
const TopoDS_Edge& EG = TopoDS::Edge(myDataStructure->Shape(GI));
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer iEG = myDataStructure->Shape(EG);
#endif
Standard_Boolean isrest = myDataStructure->DS().IsSectionEdge(EG); if (!isrest) continue;
//=======================================================================
void TopOpeBRepBuild_Builder::SplitSectionEdge(const TopoDS_Shape& EA)
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Integer iE; Standard_Boolean tSPS = GtraceSPS(EA,iE);
if (tSPS) debsplitsemess(iE);
#endif
Standard_Boolean hg = myDataStructure->HasGeometry(EOR);
Standard_Boolean hsd3d = FDS_HasSameDomain3d(BDS,EOR);
Standard_Boolean hsd2d = FDS_HasSameDomain2d(BDS,EOR);
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Boolean issplit = IsSplit(EOR,TopAbs_ON);
#endif
if(hsd2d) GLOBAL_hassd=2; //++
if (mySplitSectionEdgesDone) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
if(tSPS) {
GdumpSHA(EF, (char *) "SplitSectionEdges done : ");
if (issplit) cout<<" "<<Splits(EOR,TopAbs_ON).Extent()<<" edges splitON"<<endl;
return;
}
-#ifdef DEB
+#ifdef OCCT_DEBUG
if(tSPS)GdumpSHASTA(EF,TopAbs_ON,"--- SplitSectionEdges ");
if(tSPS)cout<<" (hg="<<hg<<"||hsd3d="<<hsd3d<<")="<<cond<<endl;
#endif
if (mke) {
MarkSplit(EOR,TopAbs_ON);
TopTools_ListOfShape& LON = ChangeSplit(EOR,TopAbs_ON);
-#ifdef DEB
+#ifdef OCCT_DEBUG
// Standard_Integer non = LON.Extent(); // DEB
#endif
TopTools_ListOfShape LESD1,LESD2; GFindSamDom(EOR,LESD1,LESD2);
-#ifdef DEB
+#ifdef OCCT_DEBUG
if(tSPS)GdumpSHASTA(EF,TopAbs_ON,"--- SplitSectionEdges ");
if(tSPS){
cout<<" (hg="<<hg<<"||hsd3d="<<hsd3d<<")="<<cond<<endl;
#endif
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (tSPS) debspseon(iE);
#endif
TopOpeBRepBuild_GTopo G = TopOpeBRepBuild_GTool::GComUnsh(TopAbs_FACE,TopAbs_FACE);
//modified by NIZHNY-MZV Mon Apr 17 16:25:53 2000 else if (rankEF == 2) losOO.Append(GLOBALDS_shape1);
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (tSPS) debspsein(iE);
#endif
TopOpeBRepBuild_GTopo G = TopOpeBRepBuild_GTool::GCutUnsh(TopAbs_FACE,TopAbs_FACE);
}
{
-#ifdef DEB
+#ifdef OCCT_DEBUG
if (tSPS) debspseou(iE);
#endif
TopOpeBRepBuild_GTopo G = TopOpeBRepBuild_GTool::GCutUnsh(TopAbs_FACE,TopAbs_FACE);
Standard_Boolean issplitON = IsSplit(es,TopAbs_ON);
TopAbs_State staspl=(issplitON)?TopAbs_ON:(issplitIN)?TopAbs_IN:TopAbs_UNKNOWN;
-#ifdef DEB
+#ifdef OCCT_DEBUG
Standard_Integer iii; Standard_Boolean tSPS = GtraceSPS(es,iii);
if (tSPS) {
GdumpSHA(es, (char *) "--- Section ");