Useless *.cxx files were removed to eliminate linker warning LNK4221.
Package TopOpeBRepDS was cleaned up from old debugging routines.
Merged OSD_signal_WNT.cxx into OSD_signal.cxx
Class Standard_ErrorHandlerCallback was moved into the Standard_ErrorHandler class as nested class Callback
Eliminated warning about unused variable.
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPAlgo_WireEdgeSet.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Shape.hxx>
BOPAlgo_ShellSplitter.hxx
BOPAlgo_Tools.cxx
BOPAlgo_Tools.hxx
-BOPAlgo_WireEdgeSet.cxx
BOPAlgo_WireEdgeSet.hxx
BOPAlgo_WireEdgeSet.lxx
BOPAlgo_WireSplitter.cxx
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Bnd_Box.hxx>
-#include <BOPDS_Curve.hxx>
-#include <BOPDS_PaveBlock.hxx>
-#include <IntTools_Curve.hxx>
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_FaceInfo.hxx>
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_PassKeyBoolean.hxx>
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 2010-2014 OPEN CASCADE SAS
-// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
-// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
-// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_PassKey.hxx>
-#include <BOPDS_PassKeyMapHasher.hxx>
+++ /dev/null
-// Created by: Eugeny MALTCHIKOV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_Pave.hxx>
-#include <BOPDS_PaveMapHasher.hxx>
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_Point.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Pnt2d.hxx>
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPDS_Tools.hxx>
BOPDS_CommonBlock.cxx
BOPDS_CommonBlock.hxx
BOPDS_CoupleOfPaveBlocks.hxx
-BOPDS_Curve.cxx
BOPDS_Curve.hxx
BOPDS_Curve.lxx
BOPDS_DataMapOfIntegerListOfPaveBlock.hxx
BOPDS_DS.cxx
BOPDS_DS.hxx
BOPDS_DS.lxx
-BOPDS_FaceInfo.cxx
BOPDS_FaceInfo.hxx
BOPDS_FaceInfo.lxx
BOPDS_IndexedDataMapOfPaveBlockListOfInteger.hxx
BOPDS_PassKey.cxx
BOPDS_PassKey.hxx
BOPDS_PassKey.lxx
-BOPDS_PassKeyBoolean.cxx
BOPDS_PassKeyBoolean.hxx
BOPDS_PassKeyBoolean.lxx
-BOPDS_PassKeyMapHasher.cxx
BOPDS_PassKeyMapHasher.hxx
BOPDS_PassKeyMapHasher.lxx
BOPDS_Pave.cxx
BOPDS_Pave.lxx
BOPDS_PaveBlock.cxx
BOPDS_PaveBlock.hxx
-BOPDS_PaveMapHasher.cxx
BOPDS_PaveMapHasher.hxx
BOPDS_PaveMapHasher.lxx
BOPDS_PDS.hxx
BOPDS_PIterator.hxx
BOPDS_PIteratorSI.hxx
-BOPDS_Point.cxx
BOPDS_Point.hxx
BOPDS_Point.lxx
BOPDS_ShapeInfo.cxx
BOPDS_ShapeInfo.lxx
BOPDS_SubIterator.cxx
BOPDS_SubIterator.hxx
-BOPDS_Tools.cxx
BOPDS_Tools.hxx
BOPDS_Tools.lxx
BOPDS_VectorOfCurve.hxx
+++ /dev/null
-// Created by: Peter KURNEV
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BOPTools_Set.hxx>
-#include <BOPTools_SetMapHasher.hxx>
BOPTools_MapOfSet.hxx
BOPTools_Set.cxx
BOPTools_Set.hxx
-BOPTools_SetMapHasher.cxx
BOPTools_SetMapHasher.hxx
BOPTools_SetMapHasher.lxx
BOPTools_ShapeSet.cxx
#include <TopOpeBRepBuild_HBuilder.hxx>
#include <TopOpeBRepBuild_Tools.hxx>
#include <TopOpeBRepDS_BuildTool.hxx>
-#include <TopOpeBRepDS_DSX.hxx>
#include <TopOpeBRepDS_HDataStructure.hxx>
#include <TopOpeBRepTool_GeomTool.hxx>
#include <TopOpeBRepTool_OutCurveType.hxx>
HDS->ChangeDS().Init();
}
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_SettraceSPSX_HDS(HDS);
-#endif
-
// fill the data Structure
TopOpeBRep_DSFiller DSFiller;
+++ /dev/null
-// Created on: 1998-02-02
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BRepFilletAPI_LocalOperation.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Vertex.hxx>
-BRepFilletAPI_LocalOperation.cxx
BRepFilletAPI_LocalOperation.hxx
BRepFilletAPI_MakeChamfer.cxx
BRepFilletAPI_MakeChamfer.hxx
+++ /dev/null
-// Created on: 1994-02-18
-// Created by: Remi LEQUETTE
-// Copyright (c) 1994-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BRepPrimAPI_MakeSweep.hxx>
-#include <TopoDS_Shape.hxx>
BRepPrimAPI_MakeRevolution.hxx
BRepPrimAPI_MakeSphere.cxx
BRepPrimAPI_MakeSphere.hxx
-BRepPrimAPI_MakeSweep.cxx
BRepPrimAPI_MakeSweep.hxx
BRepPrimAPI_MakeTorus.cxx
BRepPrimAPI_MakeTorus.hxx
FilletCirc.SetRadius( Center.Distance( FirstPoint ) ); //***
gp_Vec vec1( dir1 );
vec1 *= FilletCirc.Radius();
-#ifdef OCCT_DEBUG
- gp_Pnt p1 =
-#endif
- Center.Translated( vec1 );
gp_Vec vec2( dir2 );
vec2 *= FilletCirc.Radius();
-#ifdef OCCT_DEBUG
- gp_Pnt p2 =
-#endif
- Center.Translated( vec2 );
gp_Vec PosVec;
if(! Center.IsEqual( Position, Precision::Confusion() ))
PosVec.SetXYZ( gp_Vec(Center, Position).XYZ() );
}
FirstParCirc = ElCLib::Parameter( FilletCirc, FirstPoint );
LastParCirc = ElCLib::Parameter( FilletCirc, SecondPoint );
-
-#ifdef OCCT_DEBUG
-#endif
}
else //Angle equal 0 or PI or R = 0
{
EndOfArrow = BasePnt;
}
-
if(drawRevers)
{
gp_Vec Vd(DrawPosition, EndOfArrow);
+++ /dev/null
-// Created on: 1995-07-19
-// Created by: Modelistation
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Adaptor2d_Curve2d.hxx>
-#include <Extrema_Curve2dTool.hxx>
-#include <Geom2d_BezierCurve.hxx>
-#include <Geom2d_BSplineCurve.hxx>
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec2d.hxx>
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Extrema_POnSurf.hxx>
-#include <gp_Pnt.hxx>
+++ /dev/null
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Extrema_POnSurfParams.hxx>
-#include <gp_Pnt.hxx>
Extrema_CCLocFOfLocECC2d.hxx
Extrema_CCLocFOfLocECC2d_0.cxx
Extrema_CCLocFOfLocECC_0.cxx
-Extrema_Curve2dTool.cxx
Extrema_Curve2dTool.hxx
Extrema_Curve2dTool.lxx
Extrema_CurveLocator.gxx
Extrema_POnCurv2d.hxx
Extrema_POnCurv2d_0.cxx
Extrema_POnCurv_0.cxx
-Extrema_POnSurf.cxx
Extrema_POnSurf.hxx
Extrema_POnSurf.lxx
-Extrema_POnSurfParams.cxx
Extrema_POnSurfParams.hxx
Extrema_POnSurfParams.lxx
Extrema_SequenceOfPOnCurv.hxx
GC_MakeTrimmedCone.hxx
GC_MakeTrimmedCylinder.cxx
GC_MakeTrimmedCylinder.hxx
-GC_Root.cxx
GC_Root.hxx
GC_Root.lxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <GC_Root.hxx>
GCE2d_MakeSegment.hxx
GCE2d_MakeTranslation.cxx
GCE2d_MakeTranslation.hxx
-GCE2d_Root.cxx
GCE2d_Root.hxx
GCE2d_Root.lxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <GCE2d_Root.hxx>
GeomInt_TheMultiLineOfWLApprox.hxx
GeomInt_TheMultiLineOfWLApprox_0.cxx
GeomInt_TheMultiLineToolOfWLApprox.hxx
-GeomInt_TheMultiLineToolOfWLApprox_0.cxx
GeomInt_ThePrmPrmSvSurfacesOfWLApprox.hxx
GeomInt_ThePrmPrmSvSurfacesOfWLApprox_0.cxx
GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx
+++ /dev/null
-// Created on: 1995-01-27
-// Created by: Jacques GOUSSARD
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-
-#include <GeomInt_TheMultiLineOfWLApprox.hxx>
-#include <ApproxInt_SvSurfaces.hxx>
-
-
-#define TheMultiLine GeomInt_TheMultiLineOfWLApprox
-#define TheMultiLine_hxx <GeomInt_TheMultiLineOfWLApprox.hxx>
-#define TheMultiMPoint ApproxInt_SvSurfaces
-#define TheMultiMPoint_hxx <ApproxInt_SvSurfaces.hxx>
-#define ApproxInt_MultiLineTool GeomInt_TheMultiLineToolOfWLApprox
-#define ApproxInt_MultiLineTool_hxx <GeomInt_TheMultiLineToolOfWLApprox.hxx>
-#include <ApproxInt_MultiLineTool.gxx>
-
HLRAlgo_PolyData.cxx
HLRAlgo_PolyData.hxx
HLRAlgo_PolyData.lxx
-HLRAlgo_PolyHidingData.cxx
HLRAlgo_PolyHidingData.hxx
HLRAlgo_PolyHidingData.lxx
HLRAlgo_PolyInternalData.cxx
HLRAlgo_PolyInternalNode.cxx
HLRAlgo_PolyInternalNode.hxx
HLRAlgo_PolyInternalNode.lxx
-HLRAlgo_PolyInternalSegment.cxx
HLRAlgo_PolyInternalSegment.hxx
HLRAlgo_PolyInternalSegment.lxx
HLRAlgo_PolyShellData.cxx
HLRAlgo_Projector.cxx
HLRAlgo_Projector.hxx
HLRAlgo_Projector.lxx
-HLRAlgo_TriangleData.cxx
HLRAlgo_TriangleData.hxx
HLRAlgo_TriangleData.lxx
HLRAlgo_WiresBlock.cxx
+++ /dev/null
-// Created on: 1995-06-21
-// Created by: Christophe MARION
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <HLRAlgo_PolyHidingData.hxx>
+++ /dev/null
-// Created on: 1996-12-03
-// Created by: Christophe MARION
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <HLRAlgo_PolyInternalSegment.hxx>
+++ /dev/null
-// Created on: 1993-01-11
-// Created by: Christophe MARION
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <HLRAlgo_TriangleData.hxx>
HLRBRep_CInter_0.cxx
HLRBRep_CLProps.hxx
HLRBRep_CLProps_0.cxx
-HLRBRep_CLPropsATool.cxx
HLRBRep_CLPropsATool.hxx
HLRBRep_CLPropsATool.lxx
HLRBRep_Curve.cxx
HLRBRep_InternalAlgo.hxx
HLRBRep_Intersector.cxx
HLRBRep_Intersector.hxx
-HLRBRep_LineTool.cxx
HLRBRep_LineTool.hxx
HLRBRep_LineTool.lxx
HLRBRep_ListIteratorOfListOfBPnt2D.hxx
+++ /dev/null
-// Created on: 1992-08-18
-// Created by: Herve LEGRAND
-// Copyright (c) 1992-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec2d.hxx>
-#include <HLRBRep_CLPropsATool.hxx>
+++ /dev/null
-// Created on: 1993-12-20
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Geom_BezierCurve.hxx>
-#include <Geom_BSplineCurve.hxx>
-#include <gp_Lin.hxx>
-#include <gp_Pnt.hxx>
-#include <gp_Vec.hxx>
-#include <HLRBRep_LineTool.hxx>
-#include <Standard_DomainError.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <Standard_OutOfRange.hxx>
IntImpParGen.cxx
IntImpParGen.hxx
IntImpParGen_ImpParTool.gxx
-IntImpParGen_ImpTool.cxx
IntImpParGen_ImpTool.hxx
IntImpParGen_Intersector.gxx
IntImpParGen_Tool.cxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <gp_Pnt2d.hxx>
-#include <gp_Vec2d.hxx>
-#include <IntImpParGen_ImpTool.hxx>
IntPatch_Polygo.lxx
IntPatch_Polyhedron.cxx
IntPatch_Polyhedron.hxx
-IntPatch_PolyhedronTool.cxx
IntPatch_PolyhedronTool.hxx
IntPatch_PolyhedronTool.lxx
IntPatch_PolyLine.cxx
+++ /dev/null
-// Created on: 1993-05-06
-// Created by: Jacques GOUSSARD
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Bnd_Box.hxx>
-#include <gp_Pnt.hxx>
-#include <IntPatch_Polyhedron.hxx>
-#include <IntPatch_PolyhedronTool.hxx>
-#include <Standard_OutOfRange.hxx>
IntSurf.cxx
IntSurf.hxx
IntSurf_Allocator.hxx
-IntSurf_Couple.cxx
IntSurf_Couple.hxx
IntSurf_Couple.lxx
IntSurf_InteriorPoint.cxx
IntSurf_InteriorPoint.hxx
IntSurf_InteriorPoint.lxx
-IntSurf_InteriorPointTool.cxx
IntSurf_InteriorPointTool.hxx
IntSurf_InteriorPointTool.lxx
IntSurf_LineOn2S.cxx
IntSurf_PathPoint.cxx
IntSurf_PathPoint.hxx
IntSurf_PathPoint.lxx
-IntSurf_PathPointTool.cxx
IntSurf_PathPointTool.hxx
IntSurf_PathPointTool.lxx
IntSurf_PntOn2S.cxx
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <IntSurf_Couple.hxx>
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <IntSurf_InteriorPoint.hxx>
-#include <IntSurf_InteriorPointTool.hxx>
+++ /dev/null
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <IntSurf_PathPoint.hxx>
-#include <IntSurf_PathPointTool.hxx>
-#include <Standard_OutOfRange.hxx>
-#include <StdFail_UndefinedDerivative.hxx>
IntTools_CurveRangeSample.cxx
IntTools_CurveRangeSample.hxx
IntTools_CurveRangeSample.lxx
-IntTools_CurveRangeSampleMapHasher.cxx
IntTools_CurveRangeSampleMapHasher.hxx
IntTools_CurveRangeSampleMapHasher.lxx
IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
IntTools_SurfaceRangeSample.cxx
IntTools_SurfaceRangeSample.hxx
IntTools_SurfaceRangeSample.lxx
-IntTools_SurfaceRangeSampleMapHasher.cxx
IntTools_SurfaceRangeSampleMapHasher.hxx
IntTools_SurfaceRangeSampleMapHasher.lxx
IntTools_Tools.cxx
+++ /dev/null
-// Created on: 2005-10-14
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <IntTools_CurveRangeSample.hxx>
-#include <IntTools_CurveRangeSampleMapHasher.hxx>
+++ /dev/null
-// Created on: 2005-10-14
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <IntTools_SurfaceRangeSample.hxx>
-#include <IntTools_SurfaceRangeSampleMapHasher.hxx>
LocOpe_Pipe.cxx
LocOpe_Pipe.hxx
LocOpe_Pipe.lxx
-LocOpe_PntFace.cxx
LocOpe_PntFace.hxx
LocOpe_PntFace.lxx
LocOpe_Prism.cxx
+++ /dev/null
-// Created on: 1995-05-29
-// Created by: Jacques GOUSSARD
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <gp_Pnt.hxx>
-#include <LocOpe_PntFace.hxx>
-#include <TopoDS_Face.hxx>
MAT2d_DataMapOfIntegerPnt2d.hxx
MAT2d_DataMapOfIntegerSequenceOfConnexion.hxx
MAT2d_DataMapOfIntegerVec2d.hxx
-MAT2d_MapBiIntHasher.cxx
MAT2d_MapBiIntHasher.hxx
MAT2d_MapBiIntHasher.lxx
MAT2d_Mat2d.cxx
+++ /dev/null
-// Created on: 1993-11-19
-// Created by: Yves FRICAUD
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <MAT2d_BiInt.hxx>
-#include <MAT2d_MapBiIntHasher.hxx>
OSD_SIGKILL.hxx
OSD_signal.cxx
OSD_Signal.hxx
-OSD_signal_WNT.cxx
OSD_SIGQUIT.hxx
OSD_SIGSEGV.hxx
OSD_SIGSYS.hxx
#include <OSD.hxx>
+#include <OSD_Exception_CTRL_BREAK.hxx>
+#include <Standard_DivideByZero.hxx>
+#include <Standard_Overflow.hxx>
+
+#ifdef _WIN32
+//---------------------------- Windows NT System --------------------------------
+
+#define STRICT
+#ifdef NOUSER
+#undef NOUSER
+#endif
+#include <windows.h>
+
+#ifndef STATUS_FLOAT_MULTIPLE_FAULTS
+ // <ntstatus.h>
+ #define STATUS_FLOAT_MULTIPLE_FAULTS (0xC00002B4L)
+ #define STATUS_FLOAT_MULTIPLE_TRAPS (0xC00002B5L)
+#endif
+
+#include <OSD_Exception_ACCESS_VIOLATION.hxx>
+#include <OSD_Exception_ARRAY_BOUNDS_EXCEEDED.hxx>
+#include <OSD_Exception_ILLEGAL_INSTRUCTION.hxx>
+#include <OSD_Exception_IN_PAGE_ERROR.hxx>
+#include <OSD_Exception_INT_DIVIDE_BY_ZERO.hxx>
+#include <OSD_Exception_INT_OVERFLOW.hxx>
+#include <OSD_Exception_INVALID_DISPOSITION.hxx>
+#include <OSD_Exception_NONCONTINUABLE_EXCEPTION.hxx>
+#include <OSD_Exception_PRIV_INSTRUCTION.hxx>
+#include <OSD_Exception_STACK_OVERFLOW.hxx>
+#include <OSD_Exception_STATUS_NO_MEMORY.hxx>
+
+#include <OSD_Environment.hxx>
+#include <Standard_Underflow.hxx>
+#include <Standard_ProgramError.hxx>
+#include <Standard_Mutex.hxx>
+
+#include <OSD_WNT_1.hxx>
+
+#ifdef _MSC_VER
+#include <eh.h>
+#include <malloc.h>
+#endif
+
+#include <process.h>
+#include <signal.h>
+#include <float.h>
+
+static Standard_Boolean fMsgBox;
+static Standard_Boolean fFltExceptions;
+static Standard_Boolean fDbgLoaded;
+static Standard_Boolean fCtrlBrk;
+
+// used to forbid simultaneous execution of setting / executing handlers
+static Standard_Mutex THE_SIGNAL_MUTEX;
+
+static LONG __fastcall _osd_raise ( DWORD, LPSTR );
+static BOOL WINAPI _osd_ctrl_break_handler ( DWORD );
+
+static LONG _osd_debug ( void );
+
+//# define _OSD_FPX ( _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW )
+# define _OSD_FPX ( _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW )
+
+//=======================================================================
+//function : CallHandler
+//purpose :
+//=======================================================================
+static LONG CallHandler (DWORD dwExceptionCode,
+ ptrdiff_t ExceptionInformation1,
+ ptrdiff_t ExceptionInformation0)
+{
+
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
+
+ Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+ static char buffer[ 2048 ];
+ int flterr = 0;
+
+ buffer[0] = '\0' ;
+
+// cout << "CallHandler " << dwExceptionCode << endl ;
+ switch ( dwExceptionCode ) {
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+// cout << "CallHandler : EXCEPTION_FLT_DENORMAL_OPERAND:" << endl ;
+ lstrcpyA ( buffer, "FLT DENORMAL OPERAND" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+// cout << "CallHandler : EXCEPTION_FLT_DIVIDE_BY_ZERO:" << endl ;
+ lstrcpyA ( buffer, "FLT DIVIDE BY ZERO" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_INEXACT_RESULT:
+// cout << "CallHandler : EXCEPTION_FLT_INEXACT_RESULT:" << endl ;
+ lstrcpyA ( buffer, "FLT INEXACT RESULT" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_INVALID_OPERATION:
+// cout << "CallHandler : EXCEPTION_FLT_INVALID_OPERATION:" << endl ;
+ lstrcpyA ( buffer, "FLT INVALID OPERATION" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_OVERFLOW:
+// cout << "CallHandler : EXCEPTION_FLT_OVERFLOW:" << endl ;
+ lstrcpyA ( buffer, "FLT OVERFLOW" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_STACK_CHECK:
+// cout << "CallHandler : EXCEPTION_FLT_STACK_CHECK:" << endl ;
+ lstrcpyA ( buffer, "FLT STACK CHECK" );
+ flterr = 1 ;
+ break ;
+ case EXCEPTION_FLT_UNDERFLOW:
+// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
+ lstrcpyA ( buffer, "FLT UNDERFLOW" );
+ flterr = 1 ;
+ break ;
+ case STATUS_FLOAT_MULTIPLE_TRAPS:
+// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
+ lstrcpyA ( buffer, "FLT MULTIPLE TRAPS (possible overflow in conversion of double to integer)" );
+ flterr = 1 ;
+ break ;
+ case STATUS_FLOAT_MULTIPLE_FAULTS:
+// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
+ lstrcpyA ( buffer, "FLT MULTIPLE FAULTS" );
+ flterr = 1 ;
+ break ;
+ case STATUS_NO_MEMORY:
+// cout << "CallHandler : STATUS_NO_MEMORY:" << endl ;
+ OSD_Exception_STATUS_NO_MEMORY ::
+ Raise ( "MEMORY ALLOCATION ERROR ( no room in the process heap )" );
+ case EXCEPTION_ACCESS_VIOLATION:
+// cout << "CallHandler : EXCEPTION_ACCESS_VIOLATION:" << endl ;
+ wsprintf ( buffer, "%s%s%s0x%.8p%s%s%s", "ACCESS VIOLATION",
+ fMsgBox ? "\n" : " ", "at address ",
+ ExceptionInformation1 ,
+ " during '",
+ ExceptionInformation0 ? "WRITE" : "READ",
+ "' operation");
+ break;
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+// cout << "CallHandler : EXCEPTION_ARRAY_BOUNDS_EXCEEDED:" << endl ;
+ lstrcpyA ( buffer, "ARRAY BOUNDS EXCEEDED" );
+ break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+// cout << "CallHandler : EXCEPTION_DATATYPE_MISALIGNMENT:" << endl ;
+ lstrcpyA ( buffer, "DATATYPE MISALIGNMENT" );
+ break;
+
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+// cout << "CallHandler : EXCEPTION_ILLEGAL_INSTRUCTION:" << endl ;
+ lstrcpyA ( buffer, "ILLEGAL INSTRUCTION" );
+ break;
+
+ case EXCEPTION_IN_PAGE_ERROR:
+// cout << "CallHandler : EXCEPTION_IN_PAGE_ERROR:" << endl ;
+ lstrcpyA ( buffer, "IN_PAGE ERROR" );
+ break;
+
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+// cout << "CallHandler : EXCEPTION_INT_DIVIDE_BY_ZERO:" << endl ;
+ lstrcpyA ( buffer, "INTEGER DIVISION BY ZERO" );
+ break;
+
+ case EXCEPTION_INT_OVERFLOW:
+// cout << "CallHandler : EXCEPTION_INT_OVERFLOW:" << endl ;
+ lstrcpyA ( buffer, "INTEGER OVERFLOW" );
+ break;
+
+ case EXCEPTION_INVALID_DISPOSITION:
+// cout << "CallHandler : EXCEPTION_INVALID_DISPOSITION:" << endl ;
+ lstrcpyA ( buffer, "INVALID DISPOSITION" );
+ break;
+
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+// cout << "CallHandler : EXCEPTION_NONCONTINUABLE_EXCEPTION:" << endl ;
+ lstrcpyA ( buffer, "NONCONTINUABLE EXCEPTION" );
+ break;
+
+ case EXCEPTION_PRIV_INSTRUCTION:
+// cout << "CallHandler : EXCEPTION_PRIV_INSTRUCTION:" << endl ;
+ lstrcpyA ( buffer, "PRIVELEGED INSTRUCTION ENCOUNTERED" );
+ break;
+
+ case EXCEPTION_STACK_OVERFLOW:
+// cout << "CallHandler : EXCEPTION_STACK_OVERFLOW:" << endl ;
+#if defined( _MSC_VER ) && ( _MSC_VER >= 1300 )
+ // try recovering from stack overflow: available in MS VC++ 7.0
+ if (!_resetstkoflw())
+ lstrcpyA ( buffer, "Unrecoverable STACK OVERFLOW" );
+ else
+#endif
+ lstrcpyA ( buffer, "STACK OVERFLOW" );
+ break;
+
+ default:
+ wsprintf( buffer, "unknown exception code 0x%x, params 0x%p 0x%p",
+ dwExceptionCode, ExceptionInformation1, ExceptionInformation0 );
+
+ } // end switch
+
+ // provide message to the user with possibility to stop
+ int idx = lstrlenA ( buffer );
+ if ( idx && fMsgBox && dwExceptionCode != EXCEPTION_NONCONTINUABLE_EXCEPTION ) {
+ // reset FP operations before message box, otherwise it may fail to show up
+ _fpreset();
+ _clearfp();
+
+ MessageBeep ( MB_ICONHAND );
+ int aChoice = ::MessageBox (0, buffer, "OCCT Exception Handler", MB_ABORTRETRYIGNORE | MB_ICONSTOP);
+ if (aChoice == IDRETRY)
+ {
+ _osd_debug();
+ DebugBreak();
+ } else if (aChoice == IDABORT)
+ exit(0xFFFF);
+ }
+
+ // reset FPE state
+ if ( flterr ) {
+ if ( !fFltExceptions ) return EXCEPTION_EXECUTE_HANDLER;
+ _fpreset () ;
+ _clearfp() ;
+ _controlfp ( 0, _OSD_FPX ) ; // JR add :
+// cout << "OSD::WntHandler _controlfp( 0, _OSD_FPX ) " << hex << _controlfp(0,0) << dec << endl ;
+ }
+ return _osd_raise ( dwExceptionCode, buffer );
+#else
+ return 0;
+#endif
+}
+
+//=======================================================================
+//function : SIGWntHandler
+//purpose : Will only be used if user calls ::raise() function with
+// signal type set in OSD::SetSignal() - SIGSEGV, SIGFPE, SIGILL
+// (the latter will likely be removed in the future)
+//=======================================================================
+static void SIGWntHandler (int signum, int sub_code)
+{
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
+ Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+ switch( signum ) {
+ case SIGFPE :
+ if ( signal( signum , (void(*)(int))SIGWntHandler ) == SIG_ERR )
+ cout << "signal error" << endl ;
+ switch( sub_code ) {
+ case _FPE_INVALID :
+ CallHandler( EXCEPTION_FLT_INVALID_OPERATION ,0,0) ;
+ break ;
+ case _FPE_DENORMAL :
+ CallHandler( EXCEPTION_FLT_DENORMAL_OPERAND ,0,0) ;
+ break ;
+ case _FPE_ZERODIVIDE :
+ CallHandler( EXCEPTION_FLT_DIVIDE_BY_ZERO ,0,0) ;
+ break ;
+ case _FPE_OVERFLOW :
+ CallHandler( EXCEPTION_FLT_OVERFLOW ,0,0) ;
+ break ;
+ case _FPE_UNDERFLOW :
+ CallHandler( EXCEPTION_FLT_UNDERFLOW ,0,0) ;
+ break ;
+ case _FPE_INEXACT :
+ CallHandler( EXCEPTION_FLT_INEXACT_RESULT ,0,0) ;
+ break ;
+ default:
+ cout << "SIGWntHandler(default) -> Standard_NumericError::Raise(\"Floating Point Error\");" << endl;
+ Standard_NumericError::Raise("Floating Point Error");
+ break ;
+ }
+ break ;
+ case SIGSEGV :
+ if ( signal( signum, (void(*)(int))SIGWntHandler ) == SIG_ERR )
+ cout << "signal error" << endl ;
+ CallHandler( EXCEPTION_ACCESS_VIOLATION ,0,0) ;
+ break ;
+ case SIGILL :
+ if ( signal( signum, (void(*)(int))SIGWntHandler ) == SIG_ERR )
+ cout << "signal error" << endl ;
+ CallHandler( EXCEPTION_ILLEGAL_INSTRUCTION ,0,0) ;
+ break ;
+ default:
+ cout << "SIGWntHandler unexpected signal : " << signum << endl ;
+ break ;
+ }
+ DebugBreak ();
+#endif
+}
+
+//=======================================================================
+//function : TranslateSE
+//purpose : Translate Structural Exceptions into C++ exceptions
+// Will be used when user's code is compiled with /EHa option
+//=======================================================================
+#ifdef _MSC_VER
+// If this file compiled with the default MSVC options for exception
+// handling (/GX or /EHsc) then the following warning is issued:
+// warning C4535: calling _set_se_translator() requires /EHa
+// However it is correctly inserted and used when user's code compiled with /EHa.
+// So, here we disable the warning.
+#pragma warning (disable:4535)
+
+static void TranslateSE( unsigned int theCode, EXCEPTION_POINTERS* theExcPtr )
+{
+ Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+ ptrdiff_t info1 = 0, info0 = 0;
+ if ( theExcPtr ) {
+ info1 = theExcPtr->ExceptionRecord->ExceptionInformation[1];
+ info0 = theExcPtr->ExceptionRecord->ExceptionInformation[0];
+ }
+ CallHandler(theCode, info1, info0);
+}
+#endif
+
+//=======================================================================
+//function : WntHandler
+//purpose : Will be used when user's code is compiled with /EHs
+// option and unless user sets his own exception handler with
+// ::SetUnhandledExceptionFilter().
+//=======================================================================
+static LONG WINAPI WntHandler (EXCEPTION_POINTERS *lpXP)
+{
+ DWORD dwExceptionCode = lpXP->ExceptionRecord->ExceptionCode;
+
+ return CallHandler (dwExceptionCode,
+ lpXP->ExceptionRecord->ExceptionInformation[1],
+ lpXP->ExceptionRecord->ExceptionInformation[0]);
+}
+
+//=======================================================================
+//function : SetSignal
+//purpose :
+//=======================================================================
+void OSD::SetSignal (const Standard_Boolean theFloatingSignal)
+{
+#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
+ Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
+ LPTOP_LEVEL_EXCEPTION_FILTER aPreviousFilter;
+
+ OSD_Environment env (TEXT("CSF_DEBUG_MODE"));
+ TCollection_AsciiString val = env.Value();
+ if (!env.Failed())
+ {
+ cout << "Environment variable CSF_DEBUG_MODE setted.\n";
+ fMsgBox = Standard_True;
+ }
+ else
+ {
+ fMsgBox = Standard_False;
+ }
+
+ // Set exception handler (ignored when running under debugger). It will be used in most cases
+ // when user's code is compiled with /EHs
+ // Replaces the existing top-level exception filter for all existing and all future threads
+ // in the calling process
+ aPreviousFilter = ::SetUnhandledExceptionFilter (/*(LPTOP_LEVEL_EXCEPTION_FILTER)*/ WntHandler);
+
+ // Signal handlers will only be used when the method ::raise() will be used
+ // Handlers must be set for every thread
+ if (signal (SIGSEGV, (void(*)(int))SIGWntHandler) == SIG_ERR)
+ cout << "signal(OSD::SetSignal) error\n";
+ if (signal (SIGFPE, (void(*)(int))SIGWntHandler) == SIG_ERR)
+ cout << "signal(OSD::SetSignal) error\n";
+ if (signal (SIGILL, (void(*)(int))SIGWntHandler) == SIG_ERR)
+ cout << "signal(OSD::SetSignal) error\n";
+
+ // Set Ctrl-C and Ctrl-Break handler
+ fCtrlBrk = Standard_False;
+ SetConsoleCtrlHandler (&_osd_ctrl_break_handler, TRUE);
+
+#ifdef _MSC_VER
+// _se_translator_function pOldSeFunc =
+ _set_se_translator (TranslateSE);
+#endif
+
+ fFltExceptions = theFloatingSignal;
+ if (theFloatingSignal)
+ {
+ _controlfp (0, _OSD_FPX); // JR add :
+ }
+ else {
+ _controlfp (_OSD_FPX, _OSD_FPX); // JR add :
+ }
+#endif
+} // end OSD :: SetSignal
+
+//============================================================================
+//==== ControlBreak
+//============================================================================
+void OSD::ControlBreak () {
+ if ( fCtrlBrk ) {
+ fCtrlBrk = Standard_False;
+ OSD_Exception_CTRL_BREAK :: Raise ( TEXT( "*** INTERRUPT ***" ) );
+ }
+} // end OSD :: ControlBreak
+
+//============================================================================
+//==== _osd_ctrl_break_handler
+//============================================================================
+static BOOL WINAPI _osd_ctrl_break_handler ( DWORD dwCode ) {
+ if ( dwCode == CTRL_C_EVENT || dwCode == CTRL_BREAK_EVENT ) {
+ MessageBeep ( MB_ICONEXCLAMATION );
+ fCtrlBrk = Standard_True;
+ } else
+ exit ( 254 );
+
+ return TRUE;
+} // end _osd_ctrl_break_handler
+
+//============================================================================
+//==== _osd_raise
+//============================================================================
+static LONG __fastcall _osd_raise ( DWORD dwCode, LPSTR msg )
+{
+ if (msg[0] == '\x03') ++msg;
+
+ switch (dwCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION:
+ OSD_Exception_ACCESS_VIOLATION::Raise (msg);
+ break;
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ OSD_Exception_ARRAY_BOUNDS_EXCEEDED::Raise (msg);
+ break;
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ Standard_ProgramError::Raise (msg);
+ break;
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ OSD_Exception_ILLEGAL_INSTRUCTION::Raise (msg);
+ break;
+ case EXCEPTION_IN_PAGE_ERROR:
+ OSD_Exception_IN_PAGE_ERROR::Raise (msg);
+ break;
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+ Standard_DivideByZero::Raise (msg);
+ break;
+ case EXCEPTION_INT_OVERFLOW:
+ OSD_Exception_INT_OVERFLOW::Raise (msg);
+ break;
+ case EXCEPTION_INVALID_DISPOSITION:
+ OSD_Exception_INVALID_DISPOSITION::Raise (msg);
+ break;
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+ OSD_Exception_NONCONTINUABLE_EXCEPTION::Raise (msg);
+ break;
+ case EXCEPTION_PRIV_INSTRUCTION:
+ OSD_Exception_PRIV_INSTRUCTION::Raise (msg);
+ break;
+ case EXCEPTION_STACK_OVERFLOW:
+ OSD_Exception_STACK_OVERFLOW::Raise (msg);
+ break;
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ Standard_DivideByZero::Raise (msg);
+ break;
+ case EXCEPTION_FLT_STACK_CHECK:
+ case EXCEPTION_FLT_OVERFLOW:
+ Standard_Overflow::Raise (msg);
+ break;
+ case EXCEPTION_FLT_UNDERFLOW:
+ Standard_Underflow::Raise (msg);
+ break;
+ case EXCEPTION_FLT_INVALID_OPERATION:
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+ case EXCEPTION_FLT_INEXACT_RESULT:
+ case STATUS_FLOAT_MULTIPLE_TRAPS:
+ case STATUS_FLOAT_MULTIPLE_FAULTS:
+ Standard_NumericError::Raise (msg);
+ break;
+ default:
+ break;
+ } // end switch
+ return EXCEPTION_EXECUTE_HANDLER;
+} // end _osd_raise
+
+//============================================================================
+//==== _osd_debug
+//============================================================================
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#define __try
+#define __finally
+#define __leave return 0
+#endif
+
+LONG _osd_debug ( void ) {
+
+ LONG action ;
+
+ if ( !fDbgLoaded ) {
+
+ HKEY hKey = NULL;
+ HANDLE hEvent = INVALID_HANDLE_VALUE;
+ DWORD dwKeyType;
+ DWORD dwValueLen;
+ TCHAR keyValue[ MAX_PATH ];
+ TCHAR cmdLine[ MAX_PATH ];
+ SECURITY_ATTRIBUTES sa;
+ PROCESS_INFORMATION pi;
+ STARTUPINFO si;
+
+ __try {
+
+ if ( RegOpenKey (
+ HKEY_LOCAL_MACHINE,
+ TEXT( "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug" ),
+ &hKey
+ ) != ERROR_SUCCESS
+ ) __leave;
+
+ dwValueLen = sizeof ( keyValue );
+
+ if ( RegQueryValueEx (
+ hKey, TEXT( "Debugger" ), NULL, &dwKeyType, ( unsigned char* )keyValue, &dwValueLen
+ ) != ERROR_SUCCESS
+ ) __leave;
+
+ sa.nLength = sizeof ( SECURITY_ATTRIBUTES );
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+
+ if ( ( hEvent = CreateEvent ( &sa, TRUE, FALSE, NULL ) ) == NULL ) __leave;
+
+ wsprintf ( cmdLine, keyValue, GetCurrentProcessId (), hEvent );
+
+ ZeroMemory ( &si, sizeof ( STARTUPINFO ) );
+
+ si.cb = sizeof ( STARTUPINFO );
+ si.dwFlags = STARTF_FORCEONFEEDBACK;
+
+ // cout << "_osd_debug -> CreateProcess" << endl ;
+ if ( !CreateProcess (
+ NULL, cmdLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE,
+ NULL, NULL, &si, &pi
+ )
+ ) __leave;
-#ifndef _WIN32
+ // cout << "_osd_debug -> WaitForSingleObject " << endl ;
+ WaitForSingleObject ( hEvent, INFINITE );
+ // cout << "_osd_debug <- WaitForSingleObject -> CloseHandle " << endl ;
+
+ CloseHandle ( pi.hProcess );
+ CloseHandle ( pi.hThread );
+
+ // cout << "_osd_debug fDbgLoaded " << endl ;
+ fDbgLoaded = TRUE;
+
+ } // end __try
+
+ __finally {
+
+// cout << "_osd_debug -> CloseHandle(hKey) " << endl ;
+ if ( hKey != INVALID_HANDLE_VALUE ) CloseHandle ( hKey );
+// cout << "_osd_debug -> CloseHandle(hEvent) " << endl ;
+ if ( hEvent != INVALID_HANDLE_VALUE ) CloseHandle ( hEvent );
+// cout << "_osd_debug end __finally " << endl ;
+
+ } // end __finally
+
+ } /* end if */
+
+ action = fDbgLoaded ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER;
+// cout << "_osd_debug return " << action << " EXCEPTION_CONTINUE_EXECUTION("
+// << EXCEPTION_CONTINUE_EXECUTION << ")" << endl ;
+ return action ;
+
+} // end _osd_debug
+
+#if defined(__CYGWIN32__) || defined(__MINGW32__)
+#undef __try
+#undef __finally
+#undef __leave
+#endif
+
+#else
//---------- All Systems except Windows NT : ----------------------------------
#include <OSD_SIGBUS.hxx>
#include <OSD_SIGSEGV.hxx>
#include <OSD_SIGSYS.hxx>
-#include <OSD_Exception_CTRL_BREAK.hxx>
#include <Standard_NumericError.hxx>
-#include <Standard_DivideByZero.hxx>
-#include <Standard_Overflow.hxx>
#include <Standard_ErrorHandler.hxx>
+++ /dev/null
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <OSD.hxx>
-
-#ifdef _WIN32
-
-//---------------------------- Windows NT System --------------------------------
-
-#define STRICT
-#ifdef NOUSER
-#undef NOUSER
-#endif
-#include <windows.h>
-
-#ifndef STATUS_FLOAT_MULTIPLE_FAULTS
- // <ntstatus.h>
- #define STATUS_FLOAT_MULTIPLE_FAULTS (0xC00002B4L)
- #define STATUS_FLOAT_MULTIPLE_TRAPS (0xC00002B5L)
-#endif
-
-#include <OSD_Exception_ACCESS_VIOLATION.hxx>
-#include <OSD_Exception_ARRAY_BOUNDS_EXCEEDED.hxx>
-#include <OSD_Exception_ILLEGAL_INSTRUCTION.hxx>
-#include <OSD_Exception_IN_PAGE_ERROR.hxx>
-#include <OSD_Exception_INT_DIVIDE_BY_ZERO.hxx>
-#include <OSD_Exception_INT_OVERFLOW.hxx>
-#include <OSD_Exception_INVALID_DISPOSITION.hxx>
-#include <OSD_Exception_NONCONTINUABLE_EXCEPTION.hxx>
-#include <OSD_Exception_PRIV_INSTRUCTION.hxx>
-#include <OSD_Exception_STACK_OVERFLOW.hxx>
-#include <OSD_Exception_STATUS_NO_MEMORY.hxx>
-#include <OSD_Exception_CTRL_BREAK.hxx>
-
-#include <OSD_Environment.hxx>
-#include <Standard_Underflow.hxx>
-#include <Standard_DivideByZero.hxx>
-#include <Standard_Overflow.hxx>
-#include <Standard_ProgramError.hxx>
-#include <Standard_Mutex.hxx>
-
-#include <OSD_WNT_1.hxx>
-
-#ifdef _MSC_VER
-#include <eh.h>
-#include <malloc.h>
-#endif
-
-#include <process.h>
-#include <signal.h>
-#include <float.h>
-
-static Standard_Boolean fMsgBox;
-static Standard_Boolean fFltExceptions;
-static Standard_Boolean fDbgLoaded;
-static Standard_Boolean fCtrlBrk;
-
-// used to forbid simultaneous execution of setting / executing handlers
-static Standard_Mutex THE_SIGNAL_MUTEX;
-
-static LONG __fastcall _osd_raise ( DWORD, LPSTR );
-static BOOL WINAPI _osd_ctrl_break_handler ( DWORD );
-
-static LONG _osd_debug ( void );
-
-//# define _OSD_FPX ( _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW | _EM_UNDERFLOW )
-# define _OSD_FPX ( _EM_INVALID | _EM_DENORMAL | _EM_ZERODIVIDE | _EM_OVERFLOW )
-
-//=======================================================================
-//function : CallHandler
-//purpose :
-//=======================================================================
-static LONG CallHandler (DWORD dwExceptionCode,
- ptrdiff_t ExceptionInformation1,
- ptrdiff_t ExceptionInformation0)
-{
-
-#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
-
- Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
- static char buffer[ 2048 ];
- int flterr = 0;
-
- buffer[0] = '\0' ;
-
-// cout << "CallHandler " << dwExceptionCode << endl ;
- switch ( dwExceptionCode ) {
-
- case EXCEPTION_FLT_DENORMAL_OPERAND:
-// cout << "CallHandler : EXCEPTION_FLT_DENORMAL_OPERAND:" << endl ;
- lstrcpyA ( buffer, "FLT DENORMAL OPERAND" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
-// cout << "CallHandler : EXCEPTION_FLT_DIVIDE_BY_ZERO:" << endl ;
- lstrcpyA ( buffer, "FLT DIVIDE BY ZERO" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_INEXACT_RESULT:
-// cout << "CallHandler : EXCEPTION_FLT_INEXACT_RESULT:" << endl ;
- lstrcpyA ( buffer, "FLT INEXACT RESULT" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_INVALID_OPERATION:
-// cout << "CallHandler : EXCEPTION_FLT_INVALID_OPERATION:" << endl ;
- lstrcpyA ( buffer, "FLT INVALID OPERATION" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_OVERFLOW:
-// cout << "CallHandler : EXCEPTION_FLT_OVERFLOW:" << endl ;
- lstrcpyA ( buffer, "FLT OVERFLOW" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_STACK_CHECK:
-// cout << "CallHandler : EXCEPTION_FLT_STACK_CHECK:" << endl ;
- lstrcpyA ( buffer, "FLT STACK CHECK" );
- flterr = 1 ;
- break ;
- case EXCEPTION_FLT_UNDERFLOW:
-// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
- lstrcpyA ( buffer, "FLT UNDERFLOW" );
- flterr = 1 ;
- break ;
- case STATUS_FLOAT_MULTIPLE_TRAPS:
-// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
- lstrcpyA ( buffer, "FLT MULTIPLE TRAPS (possible overflow in conversion of double to integer)" );
- flterr = 1 ;
- break ;
- case STATUS_FLOAT_MULTIPLE_FAULTS:
-// cout << "CallHandler : EXCEPTION_FLT_UNDERFLOW:" << endl ;
- lstrcpyA ( buffer, "FLT MULTIPLE FAULTS" );
- flterr = 1 ;
- break ;
-
- case STATUS_NO_MEMORY:
-// cout << "CallHandler : STATUS_NO_MEMORY:" << endl ;
- OSD_Exception_STATUS_NO_MEMORY ::
- Raise ( "MEMORY ALLOCATION ERROR ( no room in the process heap )" );
-
- case EXCEPTION_ACCESS_VIOLATION:
-// cout << "CallHandler : EXCEPTION_ACCESS_VIOLATION:" << endl ;
- wsprintf ( buffer, "%s%s%s0x%.8p%s%s%s", "ACCESS VIOLATION",
- fMsgBox ? "\n" : " ", "at address ",
- ExceptionInformation1 ,
- " during '",
- ExceptionInformation0 ? "WRITE" : "READ",
- "' operation");
- break;
-
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
-// cout << "CallHandler : EXCEPTION_ARRAY_BOUNDS_EXCEEDED:" << endl ;
- lstrcpyA ( buffer, "ARRAY BOUNDS EXCEEDED" );
- break;
-
- case EXCEPTION_DATATYPE_MISALIGNMENT:
-// cout << "CallHandler : EXCEPTION_DATATYPE_MISALIGNMENT:" << endl ;
- lstrcpyA ( buffer, "DATATYPE MISALIGNMENT" );
- break;
-
- case EXCEPTION_ILLEGAL_INSTRUCTION:
-// cout << "CallHandler : EXCEPTION_ILLEGAL_INSTRUCTION:" << endl ;
- lstrcpyA ( buffer, "ILLEGAL INSTRUCTION" );
- break;
-
- case EXCEPTION_IN_PAGE_ERROR:
-// cout << "CallHandler : EXCEPTION_IN_PAGE_ERROR:" << endl ;
- lstrcpyA ( buffer, "IN_PAGE ERROR" );
- break;
-
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
-// cout << "CallHandler : EXCEPTION_INT_DIVIDE_BY_ZERO:" << endl ;
- lstrcpyA ( buffer, "INTEGER DIVISION BY ZERO" );
- break;
-
- case EXCEPTION_INT_OVERFLOW:
-// cout << "CallHandler : EXCEPTION_INT_OVERFLOW:" << endl ;
- lstrcpyA ( buffer, "INTEGER OVERFLOW" );
- break;
-
- case EXCEPTION_INVALID_DISPOSITION:
-// cout << "CallHandler : EXCEPTION_INVALID_DISPOSITION:" << endl ;
- lstrcpyA ( buffer, "INVALID DISPOSITION" );
- break;
-
- case EXCEPTION_NONCONTINUABLE_EXCEPTION:
-// cout << "CallHandler : EXCEPTION_NONCONTINUABLE_EXCEPTION:" << endl ;
- lstrcpyA ( buffer, "NONCONTINUABLE EXCEPTION" );
- break;
-
- case EXCEPTION_PRIV_INSTRUCTION:
-// cout << "CallHandler : EXCEPTION_PRIV_INSTRUCTION:" << endl ;
- lstrcpyA ( buffer, "PRIVELEGED INSTRUCTION ENCOUNTERED" );
- break;
-
- case EXCEPTION_STACK_OVERFLOW:
-// cout << "CallHandler : EXCEPTION_STACK_OVERFLOW:" << endl ;
-#if defined( _MSC_VER ) && ( _MSC_VER >= 1300 )
- // try recovering from stack overflow: available in MS VC++ 7.0
- if (!_resetstkoflw())
- lstrcpyA ( buffer, "Unrecoverable STACK OVERFLOW" );
- else
-#endif
- lstrcpyA ( buffer, "STACK OVERFLOW" );
- break;
-
- default:
- wsprintf( buffer, "unknown exception code 0x%x, params 0x%p 0x%p",
- dwExceptionCode, ExceptionInformation1, ExceptionInformation0 );
-
- } // end switch
-
- // provide message to the user with possibility to stop
- int idx = lstrlenA ( buffer );
- if ( idx && fMsgBox && dwExceptionCode != EXCEPTION_NONCONTINUABLE_EXCEPTION ) {
- // reset FP operations before message box, otherwise it may fail to show up
- _fpreset();
- _clearfp();
-
- MessageBeep ( MB_ICONHAND );
- int aChoice = ::MessageBox (0, buffer, "OCCT Exception Handler", MB_ABORTRETRYIGNORE | MB_ICONSTOP);
- if (aChoice == IDRETRY)
- {
- _osd_debug();
- DebugBreak();
- }
- else if (aChoice == IDABORT)
- exit(0xFFFF);
- }
-
- // reset FPE state
- if ( flterr ) {
- if ( !fFltExceptions )
- return EXCEPTION_EXECUTE_HANDLER;
- _fpreset () ;
- _clearfp() ;
- _controlfp ( 0, _OSD_FPX ) ; // JR add :
-// cout << "OSD::WntHandler _controlfp( 0, _OSD_FPX ) " << hex << _controlfp(0,0) << dec << endl ;
- }
- return _osd_raise ( dwExceptionCode, buffer );
-#else
- return 0;
-#endif
-}
-
-//=======================================================================
-//function : SIGWntHandler
-//purpose : Will only be used if user calls ::raise() function with
-// signal type set in OSD::SetSignal() - SIGSEGV, SIGFPE, SIGILL
-// (the latter will likely be removed in the future)
-//=======================================================================
-static void SIGWntHandler (int signum, int sub_code)
-{
-#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
- Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
- switch( signum ) {
- case SIGFPE :
- if ( signal( signum , (void(*)(int))SIGWntHandler ) == SIG_ERR )
- cout << "signal error" << endl ;
- switch( sub_code ) {
- case _FPE_INVALID :
- CallHandler( EXCEPTION_FLT_INVALID_OPERATION ,0,0) ;
- break ;
- case _FPE_DENORMAL :
- CallHandler( EXCEPTION_FLT_DENORMAL_OPERAND ,0,0) ;
- break ;
- case _FPE_ZERODIVIDE :
- CallHandler( EXCEPTION_FLT_DIVIDE_BY_ZERO ,0,0) ;
- break ;
- case _FPE_OVERFLOW :
- CallHandler( EXCEPTION_FLT_OVERFLOW ,0,0) ;
- break ;
- case _FPE_UNDERFLOW :
- CallHandler( EXCEPTION_FLT_UNDERFLOW ,0,0) ;
- break ;
- case _FPE_INEXACT :
- CallHandler( EXCEPTION_FLT_INEXACT_RESULT ,0,0) ;
- break ;
- default:
- cout << "SIGWntHandler(default) -> Standard_NumericError::Raise(\"Floating Point Error\");" << endl;
- Standard_NumericError::Raise("Floating Point Error");
- break ;
- }
- break ;
- case SIGSEGV :
- if ( signal( signum, (void(*)(int))SIGWntHandler ) == SIG_ERR )
- cout << "signal error" << endl ;
- CallHandler( EXCEPTION_ACCESS_VIOLATION ,0,0) ;
- break ;
- case SIGILL :
- if ( signal( signum, (void(*)(int))SIGWntHandler ) == SIG_ERR )
- cout << "signal error" << endl ;
- CallHandler( EXCEPTION_ILLEGAL_INSTRUCTION ,0,0) ;
- break ;
- default:
- cout << "SIGWntHandler unexpected signal : " << signum << endl ;
- break ;
- }
- DebugBreak ();
-#endif
-}
-
-//=======================================================================
-//function : TranslateSE
-//purpose : Translate Structural Exceptions into C++ exceptions
-// Will be used when user's code is compiled with /EHa option
-//=======================================================================
-#ifdef _MSC_VER
-
-// If this file compiled with the default MSVC options for exception
-// handling (/GX or /EHsc) then the following warning is issued:
-// warning C4535: calling _set_se_translator() requires /EHa
-// However it is correctly inserted and used when user's code compiled with /EHa.
-// So, here we disable the warning.
-#pragma warning (disable:4535)
-
-static void TranslateSE( unsigned int theCode, EXCEPTION_POINTERS* theExcPtr )
-{
- Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
- ptrdiff_t info1 = 0, info0 = 0;
- if ( theExcPtr ) {
- info1 = theExcPtr->ExceptionRecord->ExceptionInformation[1];
- info0 = theExcPtr->ExceptionRecord->ExceptionInformation[0];
- }
- CallHandler(theCode, info1, info0);
-}
-#endif
-//=======================================================================
-//function : WntHandler
-//purpose : Will be used when user's code is compiled with /EHs
-// option and unless user sets his own exception handler with
-// ::SetUnhandledExceptionFilter().
-//=======================================================================
-static LONG WINAPI WntHandler (EXCEPTION_POINTERS *lpXP)
-{
- DWORD dwExceptionCode = lpXP->ExceptionRecord->ExceptionCode;
-
- return CallHandler (dwExceptionCode,
- lpXP->ExceptionRecord->ExceptionInformation[1],
- lpXP->ExceptionRecord->ExceptionInformation[0]);
-}
-//=======================================================================
-//function : SetSignal
-//purpose :
-//=======================================================================
-void OSD::SetSignal (const Standard_Boolean theFloatingSignal)
-{
-#if !defined(__CYGWIN32__) && !defined(__MINGW32__)
- Standard_Mutex::Sentry aSentry (THE_SIGNAL_MUTEX); // lock the mutex to prevent simultaneous handling
- LPTOP_LEVEL_EXCEPTION_FILTER aPreviousFilter;
-
- OSD_Environment env (TEXT("CSF_DEBUG_MODE"));
- TCollection_AsciiString val = env.Value();
- if (!env.Failed())
- {
- cout << "Environment variable CSF_DEBUG_MODE setted.\n";
- fMsgBox = Standard_True;
- }
- else
- {
- fMsgBox = Standard_False;
- }
-
- // Set exception handler (ignored when running under debugger). It will be used in most cases
- // when user's code is compiled with /EHs
- // Replaces the existing top-level exception filter for all existing and all future threads
- // in the calling process
- aPreviousFilter = ::SetUnhandledExceptionFilter (/*(LPTOP_LEVEL_EXCEPTION_FILTER)*/ WntHandler);
-
- // Signal handlers will only be used when the method ::raise() will be used
- // Handlers must be set for every thread
- if (signal (SIGSEGV, (void(*)(int))SIGWntHandler) == SIG_ERR)
- cout << "signal(OSD::SetSignal) error\n";
- if (signal (SIGFPE, (void(*)(int))SIGWntHandler) == SIG_ERR)
- cout << "signal(OSD::SetSignal) error\n";
- if (signal (SIGILL, (void(*)(int))SIGWntHandler) == SIG_ERR)
- cout << "signal(OSD::SetSignal) error\n";
-
- // Set Ctrl-C and Ctrl-Break handler
- fCtrlBrk = Standard_False;
- SetConsoleCtrlHandler (&_osd_ctrl_break_handler, TRUE);
-
-#ifdef _MSC_VER
-// _se_translator_function pOldSeFunc =
- _set_se_translator (TranslateSE);
-#endif
-
- fFltExceptions = theFloatingSignal;
- if (theFloatingSignal)
- {
- _controlfp (0, _OSD_FPX); // JR add :
- }
- else {
- _controlfp (_OSD_FPX, _OSD_FPX); // JR add :
- }
-#endif
-} // end OSD :: SetSignal
-
-//============================================================================
-//==== ControlBreak
-//============================================================================
-
-void OSD :: ControlBreak () {
-
- if ( fCtrlBrk ) {
-
- fCtrlBrk = Standard_False;
- OSD_Exception_CTRL_BREAK :: Raise ( TEXT( "*** INTERRUPT ***" ) );
-
- } // end if
-
-} // end OSD :: ControlBreak
-
-//============================================================================
-//==== _osd_ctrl_break_handler
-//============================================================================
-
-static BOOL WINAPI _osd_ctrl_break_handler ( DWORD dwCode ) {
-
- if ( dwCode == CTRL_C_EVENT || dwCode == CTRL_BREAK_EVENT ) {
-
- MessageBeep ( MB_ICONEXCLAMATION );
- fCtrlBrk = Standard_True;
-
- } else
-
- exit ( 254 );
-
- return TRUE;
-
-} // end _osd_ctrl_break_handler
-
-//============================================================================
-//==== _osd_raise
-//============================================================================
-
-static LONG __fastcall _osd_raise ( DWORD dwCode, LPSTR msg )
-{
- if (msg[0] == '\x03') ++msg;
-
- switch (dwCode)
- {
- case EXCEPTION_ACCESS_VIOLATION:
- OSD_Exception_ACCESS_VIOLATION::Raise (msg);
- break;
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
- OSD_Exception_ARRAY_BOUNDS_EXCEEDED::Raise (msg);
- break;
- case EXCEPTION_DATATYPE_MISALIGNMENT:
- Standard_ProgramError::Raise (msg);
- break;
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- OSD_Exception_ILLEGAL_INSTRUCTION::Raise (msg);
- break;
- case EXCEPTION_IN_PAGE_ERROR:
- OSD_Exception_IN_PAGE_ERROR::Raise (msg);
- break;
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- Standard_DivideByZero::Raise (msg);
- break;
- case EXCEPTION_INT_OVERFLOW:
- OSD_Exception_INT_OVERFLOW::Raise (msg);
- break;
- case EXCEPTION_INVALID_DISPOSITION:
- OSD_Exception_INVALID_DISPOSITION::Raise (msg);
- break;
- case EXCEPTION_NONCONTINUABLE_EXCEPTION:
- OSD_Exception_NONCONTINUABLE_EXCEPTION::Raise (msg);
- break;
- case EXCEPTION_PRIV_INSTRUCTION:
- OSD_Exception_PRIV_INSTRUCTION::Raise (msg);
- break;
- case EXCEPTION_STACK_OVERFLOW:
- OSD_Exception_STACK_OVERFLOW::Raise (msg);
- break;
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- Standard_DivideByZero::Raise (msg);
- break;
- case EXCEPTION_FLT_STACK_CHECK:
- case EXCEPTION_FLT_OVERFLOW:
- Standard_Overflow::Raise (msg);
- break;
- case EXCEPTION_FLT_UNDERFLOW:
- Standard_Underflow::Raise (msg);
- break;
- case EXCEPTION_FLT_INVALID_OPERATION:
- case EXCEPTION_FLT_DENORMAL_OPERAND:
- case EXCEPTION_FLT_INEXACT_RESULT:
- case STATUS_FLOAT_MULTIPLE_TRAPS:
- case STATUS_FLOAT_MULTIPLE_FAULTS:
- Standard_NumericError::Raise (msg);
- break;
- default:
- break;
- } // end switch
- return EXCEPTION_EXECUTE_HANDLER;
-} // end _osd_raise
-
-//============================================================================
-//==== _osd_debug
-//============================================================================
-
-#if defined(__CYGWIN32__) || defined(__MINGW32__)
-#define __try
-#define __finally
-#define __leave return 0
-#endif
-
-LONG _osd_debug ( void ) {
-
- LONG action ;
-
- if ( !fDbgLoaded ) {
-
- HKEY hKey = NULL;
- HANDLE hEvent = INVALID_HANDLE_VALUE;
- DWORD dwKeyType;
- DWORD dwValueLen;
- TCHAR keyValue[ MAX_PATH ];
- TCHAR cmdLine[ MAX_PATH ];
- SECURITY_ATTRIBUTES sa;
- PROCESS_INFORMATION pi;
- STARTUPINFO si;
-
- __try {
-
- if ( RegOpenKey (
- HKEY_LOCAL_MACHINE,
- TEXT( "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug" ),
- &hKey
- ) != ERROR_SUCCESS
- ) __leave;
-
- dwValueLen = sizeof ( keyValue );
-
- if ( RegQueryValueEx (
- hKey, TEXT( "Debugger" ), NULL, &dwKeyType, ( unsigned char* )keyValue, &dwValueLen
- ) != ERROR_SUCCESS
- ) __leave;
-
- sa.nLength = sizeof ( SECURITY_ATTRIBUTES );
- sa.lpSecurityDescriptor = NULL;
- sa.bInheritHandle = TRUE;
-
- if ( ( hEvent = CreateEvent ( &sa, TRUE, FALSE, NULL ) ) == NULL ) __leave;
-
- wsprintf ( cmdLine, keyValue, GetCurrentProcessId (), hEvent );
-
- ZeroMemory ( &si, sizeof ( STARTUPINFO ) );
-
- si.cb = sizeof ( STARTUPINFO );
- si.dwFlags = STARTF_FORCEONFEEDBACK;
-
-// cout << "_osd_debug -> CreateProcess" << endl ;
- if ( !CreateProcess (
- NULL, cmdLine, NULL, NULL, TRUE, CREATE_DEFAULT_ERROR_MODE,
- NULL, NULL, &si, &pi
- )
- ) __leave;
-
-// cout << "_osd_debug -> WaitForSingleObject " << endl ;
- WaitForSingleObject ( hEvent, INFINITE );
-// cout << "_osd_debug <- WaitForSingleObject -> CloseHandle " << endl ;
-
- CloseHandle ( pi.hProcess );
- CloseHandle ( pi.hThread );
-
-// cout << "_osd_debug fDbgLoaded " << endl ;
- fDbgLoaded = TRUE;
-
- } // end __try
-
- __finally {
-
-// cout << "_osd_debug -> CloseHandle(hKey) " << endl ;
- if ( hKey != INVALID_HANDLE_VALUE ) CloseHandle ( hKey );
-// cout << "_osd_debug -> CloseHandle(hEvent) " << endl ;
- if ( hEvent != INVALID_HANDLE_VALUE ) CloseHandle ( hEvent );
-// cout << "_osd_debug end __finally " << endl ;
-
- } // end __finally
-
- } /* end if */
-
- action = fDbgLoaded ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER;
-// cout << "_osd_debug return " << action << " EXCEPTION_CONTINUE_EXECUTION("
-// << EXCEPTION_CONTINUE_EXECUTION << ")" << endl ;
- return action ;
-
-} // end _osd_debug
-
-#if defined(__CYGWIN32__) || defined(__MINGW32__)
-#undef __try
-#undef __finally
-#undef __leave
-#endif
-#endif // _WIN32
-Precision.cxx
Precision.hxx
Precision.lxx
+++ /dev/null
-// Created on: 1993-03-08
-// Created by: Remi LEQUETTE
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Precision.hxx>
Standard_DomainError.hxx
Standard_ErrorHandler.cxx
Standard_ErrorHandler.hxx
-Standard_ErrorHandlerCallback.cxx
-Standard_ErrorHandlerCallback.hxx
Standard_ExtCharacter.hxx
Standard_ExtString.cxx
Standard_ExtString.hxx
#include <Standard_Size.hxx>
#include <Standard_Integer.hxx>
-class Standard_ErrorHandlerCallback;
class Standard_ErrorHandler;
class Standard_GUID;
class Standard_Persistent;
//============================================================================
#include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx>
-#include <Standard_ErrorHandlerCallback.hxx>
#include <Standard_Mutex.hxx>
#include <Standard.hxx>
Standard_Address aPtr = aCurrent->myCallbackPtr;
myCallbackPtr = 0;
while ( aPtr ) {
- Standard_ErrorHandlerCallback* aCallback = (Standard_ErrorHandlerCallback*)aPtr;
+ Standard_ErrorHandler::Callback* aCallback = (Standard_ErrorHandler::Callback*)aPtr;
aPtr = aCallback->myNext;
// Call destructor explicitly, as we know that it will not be called automatically
aCallback->DestroyCallback();
return anActive;
}
+
+#if defined(NO_CXX_EXCEPTION) || defined(OCC_CONVERT_SIGNALS)
+
+Standard_ErrorHandler::Callback::Callback ()
+ : myHandler(0), myPrev(0), myNext(0)
+{
+}
+
+Standard_ErrorHandler::Callback::~Callback ()
+{
+ UnregisterCallback();
+}
+
+void Standard_ErrorHandler::Callback::RegisterCallback ()
+{
+ if ( myHandler ) return; // already registered
+
+ // find current active exception handler
+ Standard_ErrorHandler *aHandler =
+ Standard_ErrorHandler::FindHandler(Standard_HandlerVoid, Standard_False);
+
+ // if found, add this callback object first to the list
+ if ( aHandler ) {
+ myHandler = aHandler;
+ myNext = aHandler->myCallbackPtr;
+ if ( myNext ) ((Standard_ErrorHandler::Callback*)myNext)->myPrev = this;
+ aHandler->myCallbackPtr = this;
+ }
+}
+
+void Standard_ErrorHandler::Callback::UnregisterCallback ()
+{
+ if ( ! myHandler ) return;
+ if ( myNext )
+ ((Standard_ErrorHandler::Callback*)myNext)->myPrev = myPrev;
+ if ( myPrev )
+ ((Standard_ErrorHandler::Callback*)myPrev)->myNext = myNext;
+ else if ( ((Standard_ErrorHandler*)myHandler)->myCallbackPtr == this)
+ ((Standard_ErrorHandler*)myHandler)->myCallbackPtr = (Standard_ErrorHandler::Callback*)myNext;
+ myHandler = myNext = myPrev = 0;
+}
+#endif
\ No newline at end of file
#endif
class Standard_Failure;
-class Standard_ErrorHandlerCallback;
//! Class implementing mechanics of conversion of signals to exceptions.
//!
//! Returns the current handler (closest in the stack in the current execution thread)
Standard_EXPORT static Standard_PErrorHandler FindHandler (const Standard_HandlerStatus theStatus, const Standard_Boolean theUnlink);
+public:
+ //! Defines a base class for callback objects that can be registered
+ //! in the OCC error handler (the class simulating C++ exceptions)
+ //! so as to be correctly destroyed when error handler is activated.
+ //!
+ //! Note that this is needed only when Open CASCADE is compiled with
+ //! NO_CXX_EXCEPTION or OCC_CONVERT_SIGNALS options (i.e. on UNIX/Linux).
+ //! In that case, raising OCC exception and/or signal will not cause
+ //! C++ stack unwinding and destruction of objects created in the stack.
+ //!
+ //! This class is intended to protect critical objects and operations in
+ //! the try {} catch {} block from being bypassed by OCC signal or exception.
+ //!
+ //! Inherit your object from that class, implement DestroyCallback() function,
+ //! and call Register/Unregister in critical points.
+ //!
+ //! Note that you must ensure that your object has life span longer than
+ //! that of the try {} block in which it calls Register().
+ class Callback
+ {
+ public:
+ DEFINE_STANDARD_ALLOC
+
+ //! Registers this callback object in the current error handler (if found).
+ void RegisterCallback();
+
+ //! Unregisters this callback object from the error handler.
+ void UnregisterCallback();
+
+ //! Destructor
+ virtual ~Callback();
+
+ //! The callback function to perform necessary callback action.
+ //! Called by the exception handler when it is being destroyed but
+ //! still has this callback registered.
+ Standard_EXPORT virtual void DestroyCallback() = 0;
+
+ protected:
+
+ //! Empty constructor
+ Callback();
+
+ private:
+ Standard_Address myHandler;
+ Standard_Address myPrev;
+ Standard_Address myNext;
+
+ friend class Standard_ErrorHandler;
+ };
+
private:
Standard_PErrorHandler myPrevious;
Standard_JmpBuf myLabel;
Standard_HandlerStatus myStatus;
Standard_ThreadId myThread;
- Standard_Address myCallbackPtr;
+ Callback* myCallbackPtr;
friend class Standard_Failure;
- friend class Standard_ErrorHandlerCallback;
};
+// If neither NO_CXX_EXCEPTION nor OCC_CONVERT_SIGNALS is defined,
+// provide empty inline implementation
+#if ! defined(NO_CXX_EXCEPTION) && ! defined(OCC_CONVERT_SIGNALS)
+inline Standard_ErrorHandler::Callback::Callback ()
+ : myHandler(0), myPrev(0), myNext(0)
+{
+}
+inline Standard_ErrorHandler::Callback::~Callback ()
+{
+}
+inline void Standard_ErrorHandler::Callback::RegisterCallback ()
+{
+}
+inline void Standard_ErrorHandler::Callback::UnregisterCallback ()
+{
+}
+#endif
+
+// Definition of the old name "Standard_ErrorHandlerCallback" was kept for compatibility
+typedef Standard_ErrorHandler::Callback Standard_ErrorHandlerCallback;
+
#endif // _Standard_ErrorHandler_HeaderFile
+++ /dev/null
-// Created on: 2006-04-13
-// Created by: Andrey BETENEV
-// Copyright (c) 2006-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-// If either NO_CXX_EXCEPTION or OCC_CONVERT_SIGNALS is defined,
-// provide complete implementation
-
-#include <Standard_ErrorHandler.hxx>
-#include <Standard_ErrorHandlerCallback.hxx>
-
-#if defined(NO_CXX_EXCEPTION) || defined(OCC_CONVERT_SIGNALS)
-
-Standard_ErrorHandlerCallback::Standard_ErrorHandlerCallback ()
- : myHandler(0), myPrev(0), myNext(0)
-{
-}
-
-Standard_ErrorHandlerCallback::~Standard_ErrorHandlerCallback ()
-{
- UnregisterCallback();
-}
-
-void Standard_ErrorHandlerCallback::RegisterCallback ()
-{
- if ( myHandler ) return; // already registered
-
- // find current active exception handler
- Standard_ErrorHandler *aHandler =
- Standard_ErrorHandler::FindHandler(Standard_HandlerVoid, Standard_False);
-
- // if found, add this callback object first to the list
- if ( aHandler ) {
- myHandler = aHandler;
- myNext = aHandler->myCallbackPtr;
- if ( myNext ) ((Standard_ErrorHandlerCallback*)myNext)->myPrev = this;
- aHandler->myCallbackPtr = this;
- }
-}
-
-void Standard_ErrorHandlerCallback::UnregisterCallback ()
-{
- if ( ! myHandler ) return;
- if ( myNext )
- ((Standard_ErrorHandlerCallback*)myNext)->myPrev = myPrev;
- if ( myPrev )
- ((Standard_ErrorHandlerCallback*)myPrev)->myNext = myNext;
- else if ( ((Standard_ErrorHandler*)myHandler)->myCallbackPtr == this)
- ((Standard_ErrorHandler*)myHandler)->myCallbackPtr = myNext;
- myHandler = myNext = myPrev = 0;
-}
-
-#endif
+++ /dev/null
-// Created on: 2006-04-13
-// Created by: Andrey BETENEV
-// Copyright (c) 2006-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _Standard_ErrorHandlerCallback_HeaderFile
-#define _Standard_ErrorHandlerCallback_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Handle.hxx>
-
-class Standard_ErrorHandler;
-
-//! Defines a base class for callback objects that can be registered
-//! in the OCC error handler (the class simulating C++ exceptions)
-//! so as to be correctly destroyed when error handler is activated.
-//!
-//! Note that this is needed only when Open CASCADE is compiled with
-//! NO_CXX_EXCEPTION or OCC_CONVERT_SIGNALS options (i.e. on UNIX/Linux).
-//! In that case, raising OCC exception and/or signal will not cause
-//! C++ stack unwinding and destruction of objects created in the stack.
-//!
-//! This class is intended to protect critical objects and operations in
-//! the try {} catch {} block from being bypassed by OCC signal or exception.
-//!
-//! Inherit your object from that class, implement DestroyCallback() function,
-//! and call Register/Unregister in critical points.
-//!
-//! Note that you must ensure that your object has life span longer than
-//! that of the try {} block in which it calls Register().
-class Standard_ErrorHandlerCallback
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
- //! Registers this callback object in the current error handler (if found).
- void RegisterCallback();
-
- //! Unregisters this callback object from the error handler.
- void UnregisterCallback();
-
- //! Destructor
- virtual ~Standard_ErrorHandlerCallback ();
-
- //! The callback function to perform necessary callback action.
- //! Called by the exception handler when it is being destroyed but
- //! still has this callback registered.
- Standard_EXPORT virtual void DestroyCallback() = 0;
-
-friend class Standard_ErrorHandler;
-
-protected:
-
- //! Empty constructor
- Standard_ErrorHandlerCallback();
-
-private:
- Standard_Address myHandler;
- Standard_Address myPrev;
- Standard_Address myNext;
-};
-
-// If neither NO_CXX_EXCEPTION nor OCC_CONVERT_SIGNALS is defined,
-// provide empty inline implementation
-#if ! defined(NO_CXX_EXCEPTION) && ! defined(OCC_CONVERT_SIGNALS)
-inline Standard_ErrorHandlerCallback::Standard_ErrorHandlerCallback ()
- : myHandler(0), myPrev(0), myNext(0)
-{
-}
-inline Standard_ErrorHandlerCallback::~Standard_ErrorHandlerCallback ()
-{
-}
-inline void Standard_ErrorHandlerCallback::RegisterCallback ()
-{
-}
-inline void Standard_ErrorHandlerCallback::UnregisterCallback ()
-{
-}
-#endif
-
-#endif // _Standard_ErrorHandlerCallback_HeaderFile
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
-#include <Standard_ErrorHandlerCallback.hxx>
+#include <Standard_ErrorHandler.hxx>
#if defined(_WIN32)
#include <windows.h>
* TryLock(), and UnregisterCallback() before Unlock() (or use Sentry classes).
*/
-class Standard_Mutex : public Standard_ErrorHandlerCallback
+class Standard_Mutex : public Standard_ErrorHandler::Callback
{
public:
/**
TNaming.cxx
TNaming.hxx
-TNaming_Builder.cxx
TNaming_Builder.hxx
TNaming_CopyShape.cxx
TNaming_CopyShape.hxx
TNaming_Evolution.hxx
TNaming_Identifier.cxx
TNaming_Identifier.hxx
-TNaming_Iterator.cxx
TNaming_Iterator.hxx
TNaming_Iterator.lxx
-TNaming_IteratorOnShapesSet.cxx
TNaming_IteratorOnShapesSet.hxx
TNaming_IteratorOnShapesSet.lxx
TNaming_ListIteratorOfListOfIndexedDataMapOfShapeListOfShape.hxx
TNaming_NamingTool.cxx
TNaming_NamingTool.hxx
TNaming_NCollections.hxx
-TNaming_NewShapeIterator.cxx
TNaming_NewShapeIterator.hxx
TNaming_NewShapeIterator.lxx
-TNaming_OldShapeIterator.cxx
TNaming_OldShapeIterator.hxx
TNaming_OldShapeIterator.lxx
TNaming_PtrAttribute.hxx
TNaming_PtrNode.hxx
TNaming_PtrRefShape.hxx
-TNaming_RefShape.cxx
TNaming_RefShape.hxx
TNaming_RefShape.lxx
TNaming_SameShapeIterator.cxx
+++ /dev/null
-// Created on: 1996-12-19
-// Created by: Yves FRICAUD
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Standard_ConstructionError.hxx>
-#include <TDF_Label.hxx>
-#include <TNaming_Builder.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TNaming_UsedShapes.hxx>
-#include <TopoDS_Shape.hxx>
-
-// See methods'body in TNaming_NamedShape.cxx
+++ /dev/null
-// Created on: 1997-02-26
-// Created by: Yves FRICAUD
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Standard_NoMoreObject.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <TDF_Label.hxx>
-#include <TNaming_Iterator.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TNaming_NewShapeIterator.hxx>
-#include <TNaming_OldShapeIterator.hxx>
-#include <TopoDS_Shape.hxx>
-
-// See methods'bodies in TNaming_NamedShape.cxx
+++ /dev/null
-// Created on: 1997-05-06
-// Created by: Yves FRICAUD
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Standard_NoMoreObject.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <TNaming_IteratorOnShapesSet.hxx>
-#include <TNaming_ShapesSet.hxx>
-#include <TopoDS_Shape.hxx>
+++ /dev/null
-// Created on: 1996-12-20
-// Created by: Yves FRICAUD
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Standard_NoMoreObject.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <TDF_Label.hxx>
-#include <TNaming_Iterator.hxx>
-#include <TNaming_Name.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TNaming_Naming.hxx>
-#include <TNaming_NewShapeIterator.hxx>
-#include <TNaming_Tool.hxx>
-#include <TNaming_UsedShapes.hxx>
-#include <TopoDS_Shape.hxx>
-
-// See methods'body in TNaming_NamedShape.cxx
+++ /dev/null
-// Created on: 1996-12-20
-// Created by: Yves FRICAUD
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <Standard_NoMoreObject.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <TDF_Label.hxx>
-#include <TNaming_Iterator.hxx>
-#include <TNaming_Localizer.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TNaming_Naming.hxx>
-#include <TNaming_OldShapeIterator.hxx>
-#include <TNaming_Tool.hxx>
-#include <TNaming_UsedShapes.hxx>
-#include <TopoDS_Shape.hxx>
-
-// See methods'body in TNaming_NamedShape.cxx
+++ /dev/null
-// Created on: 1996-12-19
-// Created by: Yves FRICAUD
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TDF_Label.hxx>
-#include <TNaming_NamedShape.hxx>
-#include <TNaming_RefShape.hxx>
-#include <TopoDS_Shape.hxx>
-
-// See methods'body in TNaming_NamedShape.cxx
TObj_SequenceIterator.cxx
TObj_SequenceIterator.hxx
TObj_SequenceOfIterator.hxx
-TObj_SequenceOfObject.cxx
TObj_SequenceOfObject.hxx
TObj_TIntSparseArray.cxx
TObj_TIntSparseArray.hxx
+++ /dev/null
-// Created on: 2004-11-23
-// Created by: Pavel TELKOV
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-// The original implementation Copyright: (C) RINA S.p.A
-
-#include <TObj_SequenceOfObject.hxx>
-
#include <TestTopOpeTools.hxx>
#include <TopoDS_Shape.hxx>
#include <TopOpeBRepBuild_HBuilder.hxx>
-#include <TopOpeBRepDS_DSX.hxx>
#include <TopOpeBRepDS_Dumper.hxx>
#include <TopOpeBRepDS_HDataStructure.hxx>
{
if (PHDSD != NULL) { PHDSD->SetShape1(S1);PHDSD->SetShape2(S2); }
if (PBOOP != NULL) { PBOOP->SetShape1(S1);PBOOP->SetShape2(S2); }
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_SettraceSPSX_SS(S1,S2);
-#endif
}
//=======================================================================
{
if (PHDSD != NULL) { PHDSD->SetCurrentHDS(HDS); }
if (PBOOP != NULL) { PBOOP->SetCurrentHDS(HDS); }
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_SettraceSPSX_HDS(HDS);
-#endif
}
-#ifdef OCCT_DEBUG
-Standard_EXPORT void debloi(const TopOpeBRepDS_ListOfInterference& L)
-{
- if (PBOOP == NULL) return;
- TopOpeBRepDS_Dumper DSD(PBOOP->ChangeCurrentDS());
- DSD.DumpLOI(L,cout,"");
-}
-Standard_EXPORT void debi(const Handle(TopOpeBRepDS_Interference)& I)
-{
- if (PBOOP == NULL) return;
- TopOpeBRepDS_Dumper DSD(PBOOP->ChangeCurrentDS());
- DSD.DumpI(I,cout,"","\n");
-}
-#endif
-
//=======================================================================
//function : CurrentHB
//purpose :
TestTopOpe_HDSDisplayer* PHDSD = NULL;
static TestTopOpeDraw_Displayer* POCD = NULL;
-//Standard_IMPORT extern Standard_Integer TopOpeBRepDS_GLOBALHDSinterfselector;
-Standard_IMPORT Standard_Integer TopOpeBRepDS_GLOBALHDSinterfselector;
static Standard_Boolean SFindKeep = Standard_False;
static Standard_Boolean GFindKeep = Standard_False;
Standard_Integer Set(Standard_Integer na,const char** a,Standard_Integer iargK,Standard_Integer iargI);
virtual ~tsee_entity() {}
- void virtual Dump() const;
void virtual See() = 0;
};
return 0;
}
-void tsee_entity::Dump() const {
- TopOpeBRepDS_Dumper Dumper(myEHDS);
- if (myEisgeome) Dumper.DumpGeometry(myETK,myEindex,cout);
- if (myEisshape) Dumper.DumpTopology(myETK,myEindex,cout);
-}
-
class tsee_entity0 : public tsee_entity {
public:
gp_Pnt Pnt() const;
if (!E1.myEOK || !E2.myEOK) return 1;
E1.See();E2.See();
- E1.Dump();E2.Dump();
di<<"Distance "<<E1.myEnamedbrep.ToCString()<<" "<<E2.myEnamedbrep.ToCString()<<" : "<<E1.Pnt().Distance(E2.Pnt())<<"\n";
} // PrintDistancePP
//-----------------------------------------------------------------------
Standard_Integer tds(Draw_Interpretor& di,Standard_Integer na,const char** a)
{
- Standard_Boolean TDSkeep,TDScompact; TDSkeep = TDScompact = Standard_False;
- TopOpeBRepDS_GLOBALHDSinterfselector = 0;
-
Standard_Integer ia ;
for ( ia = 0; ia < na; ia++) {
if (!strcasecmp(a[ia],"-ssi")) {
- TopOpeBRepDS_GLOBALHDSinterfselector = 1;
suppressarg(na,a,ia);
continue;
}
TCollection_AsciiString as = a[ia];
as.Remove(1,1);
for(Standard_Integer i = 1;i <= as.Length(); i++) {
- if (as.Value(i) == 'k') TDSkeep = Standard_True;
- else if(as.Value(i) == 'l') TDScompact = Standard_False;
- else if(as.Value(i) == 's') TDScompact = Standard_True;
- else if(as.Value(i) == 'h') { tds_help(di); return 0; }
+ if (as.Value(i) == 'h') { tds_help(di); return 0; }
}
suppressarg(na,a,ia);
}
const Handle(TopOpeBRepDS_HDataStructure)& HDS = PHDSD->CurrentHDS();
if (HDS.IsNull()) {COUTNOHDS(di);return 0;}
PHDSD->CurrentBDS();
-
- TopOpeBRepDS_Dumper Dumper(HDS);
- if ( na == 1 ) { Dumper.Dump(cout,TDSkeep,TDScompact); return 0; }
-
- TDSpar Tpar(a[1]);
- Standard_Integer ids;
-
- if (na == 2) {
- if (Tpar.isshap()) {
- if (Tpar.TS() != TopAbs_SHAPE) Dumper.DumpTopology(Tpar.TK(),cout);
- else Dumper.DumpTopology(cout);
- }
- else if (Tpar.isgeom()) {
- Dumper.DumpGeometry(Tpar.TK(),cout,TDSkeep,TDScompact);
- }
- else if (Tpar.issect()) {
- Dumper.DumpSectionEdge(Tpar.TK(),cout);
- }
- else if (Tpar.isafev()) {
- TopOpeBRepDS_Explorer x;
- for (x.Init(HDS,TopAbs_FACE,TDSkeep);x.More();x.Next()) Dumper.DumpTopology(x.Type(),x.Index(),cout);
- for (x.Init(HDS,TopAbs_EDGE,TDSkeep);x.More();x.Next()) Dumper.DumpTopology(x.Type(),x.Index(),cout);
- for (x.Init(HDS,TopAbs_VERTEX,TDSkeep);x.More();x.Next()) Dumper.DumpTopology(x.Type(),x.Index(),cout);
- }
-
- else if (Tpar.isdege()) {
- TopOpeBRepDS_Explorer x;
- for (x.Init(HDS,TopAbs_EDGE,TDSkeep);x.More();x.Next()) {
- if (BRep_Tool::Degenerated(x.Edge())) Dumper.DumpTopology(x.Type(),x.Index(),cout);
- }
- }
- return 0;
- } // (na == 2)
-
- // nna > 2 : dump DS entities of type TK index Draw::Atoi(a[2])..a[narg-1])
- for (ia = 2; ia < na; ia++) {
-
- if ( !strcmp(a[ia],"sd") ) { // dump all shapes HasSameDomain of type TS
- for (TopOpeBRepDS_Explorer x(HDS,Tpar.TS(),Standard_False);x.More();x.Next()) {
- Standard_Boolean isSsd = HDS->HasSameDomain(x.Current());
- if (isSsd ) Dumper.DumpTopology(Tpar.TK(),x.Index(),cout);
- }
- }
- else {
- ids = Draw::Atoi(a[ia]);
- if ( Tpar.isshap() ) {
- if (Tpar.TS() != TopAbs_SHAPE) Dumper.DumpTopology(Tpar.TK(),ids,cout);
- else {
- TopAbs_ShapeEnum t = HDS->Shape(ids,SFindKeep).ShapeType();
- TopOpeBRepDS_Kind k = TopOpeBRepDS::ShapeToKind(t);
- Dumper.DumpTopology(k,ids,cout);
- }
- }
- else if ( Tpar.isgeom() ) {
- Dumper.DumpGeometry(Tpar.TK(),ids,cout,TDSkeep,TDScompact);
- }
- else if ( Tpar.issect() ) {
- Dumper.DumpSectionEdge(TopOpeBRepDS_EDGE,ids,cout);
- }
- }
- } // ia < na
-
+
return 0;
}
Standard_Integer i=0; TopOpeBRepDS_ListIteratorOfListOfInterference it(li);
while (it.More()) {
if(++i == ii) {
- it.Value()->Dump(cout,"\n--> remove ","\n");
li.Remove(it);
}
else it.Next();
Standard_IMPORT void TopOpeBRepTool_SettraceEND(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepTool_SettraceKRO(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepTool_SetcontextNOSEW(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SetcontextNOPNC(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceEDSF(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSP(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSF(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSFK(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSNC(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSLT(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDEGEN(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceDSFD(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettracePCI(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettracePEI(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettracePFI(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettracePI(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceSTRANGE(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceGAP(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SetcontextNOGAP(const Standard_Boolean);
Standard_IMPORT void TopOpeBRep_SettraceFITOL(const Standard_Boolean);
Standard_IMPORT void TopOpeBRep_SettraceBIPS(const Standard_Boolean);
Standard_IMPORT void TopOpeBRep_SettraceSI(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepBuild_SettraceCHKNOK(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepBuild_SettraceCU(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepBuild_SettraceCUV(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceSPSX(const Standard_Boolean, Standard_Integer, char**);
-Standard_IMPORT void TopOpeBRepDS_SettraceCX(const Standard_Boolean, Standard_Integer, char**);
-Standard_IMPORT void TopOpeBRepDS_SettraceSPSXX(const Standard_Boolean, Standard_Integer, char**);
Standard_IMPORT void TopOpeBRepBuild_SettraceSPF(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepBuild_SettraceSPS(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepBuild_SettraceSHEX(const Standard_Boolean);
Standard_IMPORT void TopOpeBRepTool_SettraceCL2DPR(const Standard_Boolean, Standard_Integer, char**);
Standard_IMPORT void TopOpeBRepTool_SettraceCL3DDR(const Standard_Boolean, Standard_Integer, char**);
Standard_IMPORT void TopOpeBRepTool_SettraceCL3DPR(const Standard_Boolean, Standard_Integer, char**);
-Standard_IMPORT void TopOpeBRepDS_SettraceBUTO(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceTRPE(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceEDPR(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceISTO(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SettraceSANTRAN(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SetcontextNOPFI(const Standard_Boolean);
-Standard_IMPORT void TopOpeBRepDS_SetcontextMKTONREG(const Standard_Boolean);
#endif
#ifdef OCCT_DEBUG
if (T.Add("tfc",(tf_value)TopClass_SettraceFC)) return 1;
if (T.Add("tend",(tf_value)TopOpeBRepTool_SettraceEND)) return 1;
if (T.Add("tkro",(tf_value)TopOpeBRepTool_SettraceKRO)) return 1;
- if (T.Add("tdsfk",(tf_value)TopOpeBRepDS_SettraceDSFK)) return 1;
- if (T.Add("tedsf",(tf_value)TopOpeBRepDS_SettraceEDSF)) return 1;
- if (T.Add("tdsp",(tf_value)TopOpeBRepDS_SettraceDSP)) return 1;
- if (T.Add("tdsf",(tf_value)TopOpeBRepDS_SettraceDSF)) return 1;
- if (T.Add("tdsnc",(tf_value)TopOpeBRepDS_SettraceDSNC)) return 1;
- if (T.Add("tdegen",(tf_value)TopOpeBRepDS_SettraceDEGEN)) return 1;
- if (T.Add("tdslt",(tf_value)TopOpeBRepDS_SettraceDSLT)) return 1;
- if (T.Add("tdsfd",(tf_value)TopOpeBRepDS_SettraceDSFD)) return 1;
- if (T.Add("tpci",(tf_value)TopOpeBRepDS_SettracePCI)) return 1;
- if (T.Add("tpei",(tf_value)TopOpeBRepDS_SettracePEI)) return 1;
- if (T.Add("tpfi",(tf_value)TopOpeBRepDS_SettracePFI)) return 1;
- if (T.Add("tpi",(tf_value)TopOpeBRepDS_SettracePI)) return 1;
- if (T.Add("tstrange",(tf_value)TopOpeBRepDS_SettraceSTRANGE)) return 1;
- if (T.Add("tgap",(tf_value)TopOpeBRepDS_SettraceGAP)) return 1;
if (T.Add("tfitol",(tf_value)TopOpeBRep_SettraceFITOL)) return 1;
if (T.Add("tbips",(tf_value)TopOpeBRep_SettraceBIPS)) return 1;
if (T.Add("tsi",(tf_value)TopOpeBRep_SettraceSI)) return 1;
if (T.Add("tnok",(tf_value)TopOpeBRepBuild_SettraceCHKNOK)) return 1;
if (T.Add("tcu",(tf_value)TopOpeBRepBuild_SettraceCU)) return 1;
if (T.Add("tcuv",(tf_value)TopOpeBRepBuild_SettraceCUV)) return 1;
- if (T.Add("tcx",(tf_intarg)TopOpeBRepDS_SettraceCX)) return 1; // tcx 0|1 [i1 ...]
- if (T.Add("tspsx",(tf_intarg)TopOpeBRepDS_SettraceSPSX)) return 1; // tspsx 0|1 [i1 ...]
- if (T.Add("tspsxx",(tf_intarg)TopOpeBRepDS_SettraceSPSXX)) return 1; // tspsxx 0|1 [i1 i2]
if (T.Add("tspf",(tf_value)TopOpeBRepBuild_SettraceSPF)) return 1; // splitface
if (T.Add("tsps",(tf_value)TopOpeBRepBuild_SettraceSPS)) return 1; // splitsolid
if (T.Add("tshex",(tf_value)TopOpeBRepBuild_SettraceSHEX)) return 1;
if (T.Add("tcl2dpr",(tf_intarg)TopOpeBRepTool_SettraceCL2DPR)) return 1;
if (T.Add("tcl3ddr",(tf_intarg)TopOpeBRepTool_SettraceCL3DDR)) return 1;
if (T.Add("tcl3dpr",(tf_intarg)TopOpeBRepTool_SettraceCL3DPR)) return 1;
- if (T.Add("tbuto",(tf_value)TopOpeBRepDS_SettraceBUTO)) return 1;
- if (T.Add("ttrpe",(tf_value)TopOpeBRepDS_SettraceTRPE)) return 1;
- if (T.Add("tedpr",(tf_value)TopOpeBRepDS_SettraceEDPR)) return 1;
- if (T.Add("tisto",(tf_value)TopOpeBRepDS_SettraceISTO)) return 1;
if (T.Add("tproedg",(tf_value)TopOpeBRep_SettracePROEDG)) return 1;
if (T.Add("tconic",(tf_value)TopOpeBRep_SettraceCONIC)) return 1;
return 0;
//----------------------------------------------------------------------------
{
if (T.Add("nosew",(tf_value)TopOpeBRepTool_SetcontextNOSEW)) return 1;
- if (T.Add("nopnc",(tf_value)TopOpeBRepDS_SetcontextNOPNC)) return 1;
if (T.Add("nosg",(tf_value)TopOpeBRepBuild_SetcontextNOSG)) return 1;
if (T.Add("ssconnex",(tf_value)TopOpeBRepBuild_SetcontextSSCONNEX)) return 1;
if (T.Add("sf2",(tf_value)TopOpeBRepBuild_SetcontextSF2)) return 1;
if (T.Add("nofufa",(tf_value)TopOpeBRepBuild_SetcontextNOFUFA)) return 1;
if (T.Add("einternal",(tf_value)TopOpeBRepBuild_SetcontextEINTERNAL)) return 1;
if (T.Add("eexternal",(tf_value)TopOpeBRepBuild_SetcontextEEXTERNAL)) return 1;
- if (T.Add("santran",(tf_value)TopOpeBRepDS_SettraceSANTRAN)) return 1;
if (T.Add("noproedg",(tf_value)TopOpeBRep_SetcontextNOPROEDG)) return 1;
if (T.Add("rest1",(tf_value)TopOpeBRep_SetcontextREST1)) return 1;
if (T.Add("rest2",(tf_value)TopOpeBRep_SetcontextREST2)) return 1;
if (T.Add("ffor",(tf_value)TopOpeBRep_SetcontextFFOR)) return 1;
if (T.Add("nopunk",(tf_value)TopOpeBRep_SetcontextNOPUNK)) return 1;
if (T.Add("nofei",(tf_value)TopOpeBRep_SetcontextNOFEI)) return 1;
- if (T.Add("nopfi",(tf_value)TopOpeBRepDS_SetcontextNOPFI)) return 1;
- if (T.Add("mktonreg",(tf_value)TopOpeBRepDS_SetcontextMKTONREG)) return 1;
- if (T.Add("nogap",(tf_value)TopOpeBRepDS_SetcontextNOGAP)) return 1;
return 0;
}
#include <TopOpeBRepTool_EXPORT.hxx>
#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_reDEB.hxx>
#include <TopOpeBRepDS_CurvePointInterference.hxx>
-extern Standard_Boolean TopOpeBRepDS_GettraceEDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
extern Standard_Boolean TopOpeBRep_GettraceEEFF();
-Standard_EXPORT void debefre(const Standard_Integer IE) {cout<<"+++ debefre E"<<IE<<endl;}
Standard_EXPORT void debposesd(void) {/*cout<<"+++ debposesd"<<endl;*/}
Standard_EXPORT void debposnesd(void) {cout<<"+++ debposnesd"<<endl;}
Standard_EXPORT void debeeff() {}
myLI1.Clear();
myLI2.Clear();
myHDS = HDS;
-
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF();
- trc = trc || TopOpeBRepDS_GettraceEDSF();
- trc = trc || TopOpeBRep_GettraceEEFF();
- if (trc) {
- if (TopOpeBRep_GettraceEEFF()) debeeff();
- TCollection_AsciiString str="EdgesFiller dim";str=str+myPEI->Dimension();
- myPEI->Dump(str,myPDS->Shape(myE1),myPDS->Shape(myE2));
- }
-#endif
+
Standard_Boolean esd = myPEI->SameDomain();
if (esd) myPDS->FillShapesSameDomain(E1,E2);
if ( ! myF1.IsNull() ) myPDS->AddShape(myF1,1);
if ( ! myF2.IsNull() ) myPDS->AddShape(myF2,2);
-#ifdef OCCT_DEBUG
- Standard_Boolean pointofsegment = P2D.IsPointOfSegment();
-#endif
-
-#ifdef OCCT_DEBUG
- if (trc) {
- if (pointofsegment && esd) debposesd();
- else if (pointofsegment && !esd) debposnesd();
- }
-#endif
-
TopOpeBRepDS_Transition T1 = P2D.Transition(1);
TopOpeBRepDS_Transition T2 = P2D.Transition(2);
TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LI);
-#ifdef OCCT_DEBUG
- Standard_Integer EIX = myPDS->Shape(E); Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- if (TRC) cout<<endl<<"RecomputeInterferences E"<<EIX<<" <- "<<LI.Extent()<<endl;
- if (TRC) tki.DumpTKIIterator("","\n");
- if (TRC) debefre(EIX);
-#endif
-
for (tki.Init(); tki.More(); tki.Next()) {
TopOpeBRepDS_Kind K; Standard_Integer G; tki.Value(K,G);
TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G); TopOpeBRepDS_ListOfInterference Rloi;
Standard_Integer nloi = loi.Extent();
if (nloi == 0) continue;
-#ifdef OCCT_DEBUG
- if (nloi > 1) {cout<<"TopOpeBRep_EdgesFiller : > 1 I on UNUN/F on E"<<EIX<<" A FAIRE"<<endl;}
-#endif
-
Handle(TopOpeBRepDS_Interference)& iloi = loi.First();
TopOpeBRepDS_Transition& TU = iloi->ChangeTransition();
Standard_Integer ifb = TU.IndexBefore();
const TopoDS_Face& fb = TopoDS::Face(myPDS->Shape(ifb));
-#ifdef OCCT_DEBUG
- Standard_Integer ifa = TU.IndexAfter();
- if (ifb != ifa) {cout<<"TopOpeBRep_EdgesFiller : ifb != ifa on E"<<EIX<<" NYI"<<endl;}
-#endif
-
Standard_Real pE = FDS_Parameter(iloi); TopOpeBRepDS_Transition TN;
TN.ShapeBefore(TU.ShapeBefore());TN.IndexBefore(TU.IndexBefore());
TN.ShapeAfter(TU.ShapeAfter());TN.IndexAfter(TU.IndexAfter());
-#ifdef OCCT_DEBUG
- Standard_Boolean ok =
-#endif
FDS_stateEwithF2d(*myPDS,E,pE,K,G,fb,TN);
-#ifdef OCCT_DEBUG
- if (TRC) {
- TopOpeBRepDS_ListOfInterference l1;l1.Append(iloi);
- TopOpeBRepDS_TKI dt;dt.FillOnGeometry(l1);dt.DumpTKIIterator("","");
- if (ok) {
- cout<<" ";TU.Dump(cout);cout<<endl;
- cout<<"--> ";TN.Dump(cout);cout<<endl;
- }
- else {
- cout<<"--> TN ko"<<endl;
- }
- }
-#endif
-
} // tki.More
} // RecomputeInterferences
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepTool_GettraceNYI();
extern Standard_Boolean TopOpeBRepTool_GettraceKRO();
-extern Standard_Boolean TopOpeBRepDS_GettraceEDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
extern Standard_Boolean TopOpeBRep_GettracePROEDG();
extern Standard_Boolean TopOpeBRep_GetcontextTOL0();
extern Standard_Boolean TopOpeBRep_GetcontextNOFEI();
TopOpeBRepDS_Transition& T1 = P2D.ChangeTransition(1);
TopOpeBRepDS_Transition& T2 = P2D.ChangeTransition(2);
-#ifdef OCCT_DEBUG
- Standard_Boolean newT1=Standard_False, newT2=Standard_False;
-#endif
Standard_Boolean isvertex12 = isvertex1 && isvertex2;
Standard_Boolean isvertex22 = isvertex2 && !isvertex12;
Standard_Boolean isvertex11 = isvertex1 && !isvertex12;
const TopoDS_Vertex& V2 = P2D.Vertex(2);
TopOpeBRepDS_Transition newT; Standard_Boolean computed = ::EdgesIntersector_checkT1D(myEdge1,myEdge2,V2,newT);
if (computed) T1.Set(newT.Orientation(TopAbs_IN));
-#ifdef OCCT_DEBUG
- else newT1 = Standard_False;
-#endif
}
Standard_Boolean T2INT = (T2.Orientation(TopAbs_IN) == TopAbs_INTERNAL);
const TopoDS_Vertex& V1 = P2D.Vertex(1);
TopOpeBRepDS_Transition newT; Standard_Boolean computed = ::EdgesIntersector_checkT1D(myEdge2,myEdge1,V1,newT);
if (computed) T2.Set(newT.Orientation(TopAbs_IN));
-#ifdef OCCT_DEBUG
- else newT2 = Standard_False;
-#endif
}
// xpu121098 : cto900I7 (e12on,vG14)
Standard_Boolean nT2 = ( !T2INT && clE1 && isvertex11 && vcl1.IsSame(P2D.Vertex(1)) );
if (nT2) T2.Set(TopAbs_INTERNAL);
-#ifdef OCCT_DEBUG
- if (trc&&(newT1||nT1)) {cout<<"-> ** newT on e(1) = ";T1.Dump(cout);cout<<endl;}
- if (trc&&(newT2||nT2)) {cout<<"-> ** newT on e(2) = ";T2.Dump(cout);cout<<endl;}
-#endif
} // (isvertex && esd)
} // MorePoint
Standard_Boolean condredu = (myHasSegment && !mySameDomain);
if (!condredu) return;
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF(); trc = trc || TopOpeBRepDS_GettraceEDSF();
- if (trc) Dump("AVANT ReduceSegments");
-#endif
-
Standard_Integer ip = 1;Standard_Integer np = mynp2d;
while (ip < np) {
TopOpeBRep_Point2d& psa = mysp2d(ip);
IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRep_FFDumper,MMgt_TShared)
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFK();
static TCollection_AsciiString PRODINP("dinp ");
#endif
if (VPI.More()) cout<<endl;
for (;VPI.More();VPI.Next()) {
const TopOpeBRep_VPointInter& VP = VPI.CurrentVP();
- Standard_Boolean dump = VP.Keep() || TopOpeBRepDS_GettraceDSFK();
+ Standard_Boolean dump = VP.Keep();
if (dump) { DumpVP(VP); cout<<endl; }
}
cout<<PRODINP<<"L"<<il<<"P"<<VP.Index();if (k) cout<<"K";cout<<" "<<P.X()<<" "<<P.Y()<<" "<<P.Z();
cout<<"; #draw"<<endl;
- if (TopOpeBRepDS_GettraceDSFK()) {
- Standard_Real u,v;
- VP.ParametersOnS1(u,v); cout<<"u1,v1 : "<<u<<" "<<v; cout<<" ";
- VP.ParametersOnS2(u,v); cout<<"u2,v2 : "<<u<<" "<<v; cout<<endl;
- }
-
if (VP.ShapeIndex() == 1)
DumpVP(VP,1);
else if (VP.ShapeIndex() == 2)
const TopoDS_Edge& E = TopoDS::Edge(VP.Edge(ISI));
Standard_Real Epar = VP.EdgeParameter(ISI);
TopAbs_Orientation O = E.Orientation();
- TopOpeBRepDS_Transition T = TopOpeBRep_FFTransitionTool::ProcessLineTransition(VP,ISI,O);
+ TopOpeBRep_FFTransitionTool::ProcessLineTransition(VP,ISI,O);
const TopoDS_Face F = myPFF->Face(ISI);
Standard_Boolean Closed = TopOpeBRepTool_ShapeTool::Closed(E,F);
Standard_Boolean Degen = BRep_Tool::Degenerated(E);
if (Closed) cout<<"on closing edge "; else cout<<"on edge ";
if (Degen) cout<<" on degenerated edge ";
TopAbs::Print(O,cout); cout<<" (ds"<<dsi<<") (ex"<<exi<<") of face of "<<ISI;
- cout<<" : line transition : ";T.Dump(cout);cout<<endl;
#endif
}
#include <TopOpeBRepDS_SurfaceCurveInterference.hxx>
#include <TopOpeBRepDS_Transition.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-#endif
-
//-----------------------------------------------------------------------
//function : TransitionToOrientation
//purpose : static
case IntSurf_Outside : result = TopAbs_EXTERNAL; break;
case IntSurf_Unknown :
Odefined = Standard_False;
-#ifdef OCCT_DEBUG
-// if ( TopOpeBRepDS_GettraceDSF() ) {
-// cout<<"TopOpeBRepDS:TransitionToOrientation : unknown situation"<<endl;
-// }
-#endif
break;
}
break;
case IntSurf_Undecided :
Odefined = Standard_False;
-#ifdef OCCT_DEBUG
-// if ( TopOpeBRepDS_GettraceDSF() ) {
-// cout<<"TopOpeBRepDS:TransitionToOrientation : undecided transition"<<endl;
-// }
-#endif
break;
}
case IntSurf_Unknown :
Odefined = Standard_False;
-#ifdef OCCT_DEBUG
- if ( TopOpeBRepDS_GettraceDSF() ) {
- cout<<"ProcessFaceTransition : unknown situation"<<endl;
- }
-#endif
break;
}
break;
} // case Touch
case IntSurf_Undecided :
-
- Odefined = Standard_False;
-#ifdef OCCT_DEBUG
- if ( TopOpeBRepDS_GettraceDSF() ) {
- cout<<"ProcessFaceTransition : undecided transition"<<endl;
- }
-#endif
- break;
+ Odefined = Standard_False;
+ break;
} // trans
#ifdef OCCT_DEBUG
extern void FEINT_DUMPPOINTS(TopOpeBRep_FaceEdgeIntersector& FEINT,
const TopOpeBRepDS_DataStructure& BDS);
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
#endif
//=======================================================================
const TopoDS_Face& FF = TopoDS::Face(F);
const TopoDS_Edge& EE = TopoDS::Edge(E);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF()) {
- FEINT_DUMPPOINTS(FEINT,HDS->DS());
- }
-#endif
-
// exit if no point.
FEINT.InitPoint();
if ( ! FEINT.MorePoint() ) return;
// append I to list LI
LI.Append(I);
-#ifdef OCCT_DEBUG
- Standard_Boolean appendtoG = Standard_False;
-#endif
Standard_Integer G = I->Geometry();
// append I to list of interference connected to G = I->Geometry()
break;
case TopOpeBRepDS_SURFACE :
-#ifdef OCCT_DEBUG
- appendtoG = Standard_True;
-#endif
BDS.ChangeSurfaceInterferences(G).Append(I);
break;
case TopOpeBRepDS_CURVE :
-#ifdef OCCT_DEBUG
- appendtoG = Standard_True;
-#endif
BDS.ChangeCurveInterferences(G).Append(I);
break;
default:
break;
}
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF()) {
- cout<<"append "; I->Dump(cout);
- if (appendtoG) cout<<" and to G"<<G<<" list";
- cout<<endl;
- }
-#endif
}
//=======================================================================
cout<<"\t"<<P3D.X()<<" "<<P3D.Y()<<" "<<P3D.Z()<<endl;
cout<<"\t"; if (isvertexF) cout<<"IS VERTEX, ";
- cout<<"T on "<<FFindex<<" : "; T1.Dump(cout);
cout<<" pUV = "<<pUV.X()<<" "<<pUV.Y()<<endl;
cout<<" sta = "; TopAbs::Print(sta,cout);cout<<endl;
cout<<"\t"; if (isvertexE) cout<<"IS VERTEX, ";
- cout<<"T on "<<EEindex<<" : "; T2.Dump(cout);
cout<<" parE = "<<parE<<endl;
}
}
}
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFK();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
void debffsamdom(void){}
#endif
TopOpeBRep_TypeLineCurve t = L.TypeLineCurve();
Standard_Integer nbvp = L.NbVPoint();
-#ifdef OCCT_DEBUG
- Standard_Boolean TDSF = TopOpeBRepDS_GettraceDSF();
- if (TDSF) { cout<<"CheckLine ";TopOpeBRep::Print(t,cout);cout<<" "<<nbvp<<" points"<<endl; }
-#endif
-
if ( t == TopOpeBRep_WALKING ) {
if ( nbvp < 2 ) {
#ifdef OCCT_DEBUG
if (isBV1) V2 = B.VertexOnS1();
if (isBV2) V2 = B.VertexOnS2();
-#ifdef OCCT_DEBUG
- if (TDSF) {
- cout<<"CheckLine : isAV1 isAV2 isBV1 isBV2 ";
- cout<<isAV1<<" "<<isAV2<<" "<<isBV1<<" "<<isBV2<<endl;
- }
-#endif
-
if ( !V1.IsNull() && ( V1.IsSame(V2) ) ) {
-#ifdef OCCT_DEBUG
- Standard_Real parA = A.ParameterOnLine();
- Standard_Real parB = B.ParameterOnLine();
- if (TDSF) {
- cout<<"kpart : parA parB delta "<<parA<<" "<<parB<<" "<<parA-parB<<endl;
- cout<<"kpart : rejet de ligne"<<endl;
- }
-#endif
return Standard_False;
}
} // LINE
void TopOpeBRep_FacesFiller::VP_Position(TopOpeBRep_LineInter& L)
{
myLine = &L;
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSFK()) {
- cout<<endl<<"VP_Position on line "<<L.Index()<<" ";L.DumpType();cout<<endl;
- }
-#endif
Standard_Boolean isrest = (L.TypeLineCurve() == TopOpeBRep_RESTRICTION) ;
if (!isrest) VP_PositionOnL(L);
else VP_PositionOnR(L);
L.SetVPBounds();
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSFK()) {
- Standard_Integer VPF,VPL,VPN; L.VPBounds(VPF,VPL,VPN);
- cout<<"SetVPBounds : VPF,VPL,VPN = "<<VPF<<","<<VPL<<","<<VPN;
- if (VPN != 0) cout<<" : VP(s) kept"<<endl;
- else cout<<" : NO VP kept"<<endl;
- }
-#endif
}
//=======================================================================
VP.ChangeKeep(Standard_False); // xpu051198
}
}
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSFK()) {
- cout<<"VP "<<VP.Index()<<" on "<<Esi<<" : ";
- TopAbs::Print(VP.State(Esi),cout);
- cout<<"/"<<Esi<<" ";
- if (VP.Keep()) { cout<<"kept"<<endl; }
- else { cout<<"NOT kept"<<endl; }
- }
-#endif
}
}
if (c1) VPC.VPointPosition(myF1,VP,1,myPointClassifier,AssumeINON,tol);
if (c2) VPC.VPointPosition(myF2,VP,2,myPointClassifier,AssumeINON,tol);
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSFK()) {
- cout<<"VP "<<VP.Index()<<" on "<<si<<" : ";
- if (c1) { TopAbs::Print(VP.State(1),cout);cout<<"/1 "; }
- if (c2) { TopAbs::Print(VP.State(2),cout);cout<<"/2 "; }
- if (VP.Keep()) { cout<<"kept"<<endl; }
- else { cout<<"NOT kept"<<endl; }
- }
-#endif
}
//=======================================================================
Standard_EXPORT void debrest(const Standard_Integer i) {cout<<"+ debrest "<<i<<endl;}
Standard_EXPORT void debrline() {cout<<"+ debrline"<<endl;}
-extern Standard_Boolean TopOpeBRepDS_GettraceCX(const Standard_Integer i);
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer i);
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-extern Standard_Boolean TopOpeBRepDS_GettraceISTO();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSP();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFK();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSLT();
extern Standard_Boolean TopOpeBRep_GettraceNVP(Standard_Integer a,Standard_Integer b,Standard_Integer c,Standard_Integer d,Standard_Integer e);
extern Standard_Boolean GLOBAL_bvpr;
extern void debvprmess(Standard_Integer f1,Standard_Integer f2,Standard_Integer il,Standard_Integer vp,Standard_Integer si);
Standard_Boolean reject = ( !myLineOK || myLine==NULL );
if (reject) return;
ResetDSC();
-
-#ifdef OCCT_DEBUG
- Standard_Integer ili = myLine->Index(),nli = myFacesIntersector->NbLines();
- Standard_Boolean tcx = TopOpeBRepDS_GettraceCX(ili);
- Standard_Boolean tDSF = TopOpeBRepDS_GettraceDSF();
- Standard_Boolean traceDSNC = TopOpeBRepDS_GettraceDSNC();
- if(tDSF)cout<<"trc tnvp 1 "<<myexF1<<" "<<myexF2<<" "<<ili<<endl;
- if (tDSF||tcx) myHFFD->DumpLine(*myLine);
- if (traceDSNC) cout<<"line "<<ili<<"/"<<nli<<endl;
-#endif
-
+
Standard_Boolean HasVPonR = myLine->HasVPonR();
if (HasVPonR) FillLineVPonR();
else FillLine();
if (inl) return;
myHDS->SortOnParameter(myDSCIL);
-
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_Dumper Dumper(myHDS);
- if (tDSF||traceDSNC) Dumper.DumpLOI(myDSCIL,cout,"current curve : ");
-#endif
-
+
AddShapesLine();
}
//=======================================================================
void TopOpeBRep_FacesFiller::ProcessVPnotonR(const TopOpeBRep_VPointInter& VP)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean traceDSF = TopOpeBRepDS_GettraceDSF();
- Standard_Boolean traceDSP = TopOpeBRepDS_GettraceDSP();
- Standard_Boolean traceISTO = TopOpeBRepDS_GettraceISTO();
- if (traceDSF) cout<<endl;
-#endif
-
Standard_Integer ShapeIndex = 0;
Standard_Integer iVP = VP.Index();
#ifdef OCCT_DEBUG
Standard_Integer ili=myLine->Index(),ivp=iVP,isi=ShapeIndex;
- if(traceDSF || traceDSP){
- cout<<"trc tnvp 1 "<<myexF1<<" "<<myexF2<<" "<<ili<<" "<<ivp<<" "<<isi;
- cout<<"; # VPonR "<<iVP<<" on "<<ShapeIndex<<endl;
- }
- if (traceISTO) {
- cout<<"f1,f2,l,vp,si : ";
- cout<<myexF1<<","<<myexF2<<","<<ili<<","<<ivp<<","<<isi<<endl;
- }
GLOBAL_bvpr = TopOpeBRep_GettraceNVP(myexF1,myexF2,ili,ivp,isi);
if (GLOBAL_bvpr) debvprmess(myexF1,myexF2,ili,ivp,isi);
#endif
//=======================================================================
void TopOpeBRep_FacesFiller::ProcessRLine()
{
-#ifdef OCCT_DEBUG
- Standard_Boolean tDSF = TopOpeBRepDS_GettraceDSF();
-#endif
-
if (myLine->TypeLineCurve() != TopOpeBRep_RESTRICTION) {return;}
Standard_Boolean addIFE = Standard_True;
Standard_Integer rank = myDS->AncestorRank(iErest);
Standard_Integer OOrank = (rank == 1)? 2: 1;
-#ifdef OCCT_DEBUG
- if (tDSF) {cout<<"+ edge restriction "<<myDS->SectionEdge(Erest);
- cout<<" (DS "<<iErest<<")"<<endl;}
- Standard_Boolean trce = TopOpeBRepDS_GettraceSPSX(iErest); if(trce) debrest(iErest);
-#endif
-
Standard_Integer iF1 = myDS->AddShape(myF1,1);
Standard_Integer iF2 = myDS->AddShape(myF2,2);
Handle(TopOpeBRepDS_Interference) IFE;
if (nopunk) processUNK = Standard_False;
#endif
if (processUNK && (T1unk || T2unk)) {
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSTRANGE(); trc = trc || tDSF;
- if (trc) cout<<"T UNKNOWN FEI F"<<iF1<<" F"<<iF2<<" on Erest"<<iErest<<endl;
-#endif
TopoDS_Shape F = (*this).Face(rank); Standard_Integer iF = myDS->Shape(F);
TopoDS_Shape OOF = (*this).Face(OOrank); Standard_Integer iOOF = myDS->Shape(OOF);
Standard_Boolean findTOOF = (T1unk && (OOrank == 1)) || (T2unk && (OOrank == 2));
if (OOTok) {
if (OOrank == 1) FDS_SetT(T1,T);
else FDS_SetT(T2,T);
-#ifdef OCCT_DEBUG
- if (trc) {
- cout<<"F"<<iOOF<<" + new FEI(";TopAbs::Print(T.Before(),cout);cout<<",";
- TopAbs::Print(T.After(),cout);cout<<" (F"<<iF<<") (E"<<iErest<<"))\n";
- }
-#endif
}
} // !findTOOF
if (findTF) {
if (Tok) {
if (rank == 1) FDS_SetT(T1,T);
else FDS_SetT(T2,T);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"F"<<iF<<" + new FEI(";TopAbs::Print(T.Before(),cout);cout<<",";
- TopAbs::Print(T.After(),cout);cout<<" (F"<<iOOF<<") (E"<<iErest<<"))\n";}
-#endif
}
}
T1unk = T1.IsUnknown();
TopOpeBRep_VPointInterIterator VPI;
VPI.Init((*myLine));
Standard_Real tola = Precision::Angular()*1.e5;//NYIXPUTOL
-
-#ifdef OCCT_DEBUG
- if (tDSF) {
- debrline();
- cout<<endl<<"------------ Rline processing --------------------"<<endl;
- }
-#endif
-
const TopOpeBRep_VPointInter& vpf = VPI.CurrentVP();
for (; VPI.More(); VPI.Next()) {
const TopOpeBRep_VPointInter& VP = VPI.CurrentVP();
-#ifdef OCCT_DEBUG
- if (tDSF) {cout<<endl;myHFFD->DumpVP(VP);}
-#endif
Standard_Integer absindex = VP.ShapeIndex(); // 0,1,2,3
Standard_Real parRest;
Standard_Boolean okR = VP.ParonE(Erest,parRest);
Standard_Integer iOOFace = myDS->Shape(OOFace);
TopoDS_Edge edge,OOedge; Standard_Integer OOedgeIndex;
-#ifdef OCCT_DEBUG
- Standard_Integer SIedgeIndex;
-#endif
Standard_Real paredge;
Standard_Integer onbound;
if (SIErest) {
edge = Erest;
-#ifdef OCCT_DEBUG
- SIedgeIndex = iErest;
-#endif
paredge = parRest;
onbound = obRest;
OOedge = OOE;
OOedgeIndex = iErest;
onbound = obOO;
edge = OOE;
-#ifdef OCCT_DEBUG
- SIedgeIndex = iOO;
-#endif
paredge = OOpar;
}
// PVIndex :
if (!ok) continue;
transEdge.Before(Tr.Before()); transEdge.After(Tr.After());
}
-#ifdef OCCT_DEBUG
- if (tDSF) {cout<<"*-> new transEdge (edge"<<SIedgeIndex<<",face"<<iOOFace<<")=";
- TopAbs::Print(transEdge.Before(),cout);
- cout<<" ";TopAbs::Print(transEdge.After(),cout);cout<<endl;}
-#endif
}//Tunk
Tunk = FDS_hasUNK(transEdge);
if (Tunk) continue;
void TopOpeBRep_FacesFiller::FillLineVPonR()
{
#ifdef OCCT_DEBUG
- Standard_Boolean tDSF = TopOpeBRepDS_GettraceDSF();
Standard_Boolean trline = Standard_False;
#endif
// if a VP is on degenerated edge, adds the triplet
// walking (case mouch1a 1 1) : line (vpfirst on 3,vplast on 0,nvpkept = 2) => kept
myLastVPison0 = ::FUN_haslastvpon0(*myLine);
-
-#ifdef OCCT_DEBUG
- if (tDSF) {
- if (myLineIsonEdge) cout<<" geometric line is on edge"<<endl;
- else cout <<" geometric line not on edge"<<endl;
- }
-#endif
+
//---------------------------------------------------------------------- // IMPORTANT :
// Some of Curve/Point transitions for vpoints keep on RESTRICTION lines
// sharing same domain with the current geometric line are computed here
//=======================================================================
void TopOpeBRep_FacesFiller::FillLine()
{
-#ifdef OCCT_DEBUG
- Standard_Boolean tDSF = TopOpeBRepDS_GettraceDSF();
-#endif
-
Standard_Integer iINON1,iINONn,nINON;
myLine->VPBounds(iINON1,iINONn,nINON);
if ( nINON == 0 ) return;
const TopOpeBRep_VPointInter& VP = VPI.CurrentVP();
if ( ! VP.Keep() ) continue;
-
-#ifdef OCCT_DEBUG
- if (tDSF) cout<<endl;
-#endif
-
+
Standard_Integer PVIndex;
TopOpeBRepDS_Kind PVKind;
TopOpeBRepDS_ListIteratorOfListOfInterference itCPIL(myDSCIL);
}
if (onsampt) id = Standard_True;
}
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF()) {
- cout<<endl<<"minmax "<<pmin<<","<<pmax;
- if (id) cout<<" --> rejet";
- cout<<endl;
- }
-#endif
-
+
if (id) {
DSC.ChangeKeep(Standard_False);
return;
if ( myDSCIndex == 0 ) {
TopOpeBRepDS_Curve DSC;
myDSCIndex = myDS->AddCurve(DSC);
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF() || TopOpeBRepDS_GettraceDSNC())
- cout<<"new DSC "<<myDSCIndex<<endl;
- if (TopOpeBRepDS_GettraceDSLT()) myLine->DumpLineTransitions(cout);
-#endif
}
I->Support(myDSCIndex);
{
TopOpeBRepDS_Point DSP = TopOpeBRep_PointGeomTool::MakePoint(VP);
Standard_Boolean b = myHDS->GetGeometry(IT,DSP,G,K);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF() || TopOpeBRepDS_GettraceDSP();
- if (b && trc) {
- Standard_Boolean newinDS = Standard_False; myHFFD->DumpDSP(VP,K,G,newinDS);
- }
-#endif
return b;
}
K = TopOpeBRepDS_POINT;
}
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF() || TopOpeBRepDS_GettraceDSP();
- if (trc) {
- Standard_Boolean newinDS = Standard_True; myHFFD->DumpDSP(VP,K,G,newinDS);
- }
-#endif
-
return G;
}
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRep_GetcontextALWLNBP(Standard_Integer&);
extern Standard_Boolean TopOpeBRep_GettraceCONIC();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
#endif
//-----------------------------------------------------------------------
void TopOpeBRep_LineInter::SetOK(const Standard_Boolean B)
{
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF() || TopOpeBRepDS_GettraceDSNC()) {
- if (myOK != B) {
- cout<<"line "<<myIndex<<" (";
- TopOpeBRep::Print(myTypeLineCurve,cout);cout<<") ";
- if (!B) cout<<"OK->NOK"; else cout<<"NOK->OK";
- cout<<endl;
- }
- }
-#endif
myOK = B;
}
{
#ifdef OCCT_DEBUG
OS<<"transition from f1 / f2 "; TopAbs::Print(myF2.Orientation(),OS);
- OS<<" : "; myLineTonF1.Dump(OS); OS<<endl;
OS<<"transition from f2 / f1 "; TopAbs::Print(myF1.Orientation(),OS);
- OS<<" : "; myLineTonF2.Dump(OS); OS<<endl;
#endif
return OS;
}
Standard_Integer sts = Status();
Standard_Boolean pos = IsPointOfSegment();
- const TopOpeBRepDS_Transition& T1 = Transition(1);
- const TopOpeBRepDS_Transition& T2 = Transition(2);
-
Standard_Boolean isvertex1 = IsVertex(1); TopoDS_Vertex V1; if (isvertex1) V1 = Vertex(1);
Standard_Boolean isvertex2 = IsVertex(2); TopoDS_Vertex V2; if (isvertex2) V2 = Vertex(2);
cout<<" on (1) :";
cout<<" vertex(1) : ";
cout<<(isvertex1?1:0);
- cout<<" T "<<E1index<<"(1) : ";
- T1.Dump(cout);
+ cout<<" T "<<E1index<<"(1)";
cout<<" par(1) = "<<par1;
if (isvertex1) {
P3D = BRep_Tool::Pnt(V1);
cout<<" on (2) :";
cout<<" vertex(2) : ";
cout<<(isvertex2?1:0);
- cout<<" T "<<E2index<<"(2) : ";
- T2.Dump(cout);
+ cout<<" T "<<E2index<<"(2)";
cout<<" par(2) = "<<par2;
if (isvertex2) {
P3D = BRep_Tool::Pnt(V2);
#include <TopOpeBRep_FFDumper.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom_Line.hxx>
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
-extern Standard_Boolean TopOpeBRepDS_GettraceDEGEN();
extern Standard_Boolean TopOpeBRep_GettraceBIPS();
extern Standard_Boolean TopOpeBRep_GettraceDEGEN();
extern Standard_Boolean FUN_debnull(const TopoDS_Shape& s){Standard_Boolean isnull = s.IsNull(); if (isnull) cout <<"***"; return isnull;}
#include <TopOpeBRepTool_TOOL.hxx>
#include <TopTools_MapOfShape.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFK();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
-#endif
-
Standard_EXPORT Standard_Boolean FUN_EqualponR(const TopOpeBRep_LineInter& Lrest,
const TopOpeBRep_VPointInter& VP1,
const TopOpeBRep_VPointInter& VP2);
{
#ifdef OCCT_DEBUG
- Standard_Boolean b22 = TopOpeBRepDS_GettraceDSNC();
Standard_Boolean trRL=Standard_False;
#endif
mapES.Add(E);
LES.Append(E);
}
-
-#ifdef OCCT_DEBUG
- if (b22) {
- if (add) cout<<" : add restriction edge of line ";
- else cout<<" rejection of restriction edge of line ";
- cout<<L.Index()<<endl;
- }
-#endif
}
-
} // loop on lines
}
Standard_Boolean TopOpeBRep_FacesFiller::KeepRLine
(const TopOpeBRep_LineInter& L,const Standard_Boolean checkkeep) const
{
-#ifdef OCCT_DEBUG
- //Standard_Boolean trc = (TopOpeBRepDS_GettraceDSF() || TopOpeBRepDS_GettraceDSNC());
-#endif
-
TopOpeBRep_TypeLineCurve t = L.TypeLineCurve();
Standard_Boolean isrest = (t == TopOpeBRep_RESTRICTION);
if (!isrest) return Standard_False;
//=======================================================================
void TopOpeBRep_FacesFiller::ProcessSectionEdges()
{
-#ifdef OCCT_DEBUG
- Standard_Boolean DSNC = TopOpeBRepDS_GettraceDSNC();
- if (DSNC) cout<<endl<<"--- Section Edges Processing : ---"<<endl;
-#endif
-
// recuperation des aretes d'intersection mapES
// MSV: replace map with list to achieve predictable order of edges
TopTools_ListOfShape LES;
Standard_Boolean isdg = BRep_Tool::Degenerated(E); //xpu290698
if (isdg) continue; //xpu290698
-#ifdef OCCT_DEBUG
- Standard_Integer iSE =
-#endif
- myDS->AddSectionEdge(E);
-#ifdef OCCT_DEBUG
- Standard_Integer iE =
-#endif
- myDS->Shape(E);
-#ifdef OCCT_DEBUG
- Standard_Integer rE =
-#endif
- myDS->AncestorRank(E);
-#ifdef OCCT_DEBUG
- if (DSNC) cout<<"add section edge "<<iSE<<" : "<<iE<<"("<<rE<<")"<<endl;
-#endif
+ myDS->AddSectionEdge(E);
+ myDS->Shape(E);
+ myDS->AncestorRank(E);
}
TColStd_ListOfInteger LOI; TColStd_ListIteratorOfListOfInteger itLOI;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itmapELE;
-#ifdef OCCT_DEBUG
- if (DSNC) {
- for (itmapELE.Initialize(mapELE); itmapELE.More(); itmapELE.Next()) {
- const TopoDS_Edge& E1 = TopoDS::Edge(itmapELE.Key());
- Standard_Integer iE1 = myDS->Shape(E1);
- Standard_Integer rE1 = myDS->AncestorRank(iE1);
- cout<<"sd3d edge "<<iE1<<"("<<rE1<<") : ";
- TopTools_ListIteratorOfListOfShape itL(itmapELE.Value());
- for (; itL.More(); itL.Next()) {
- const TopoDS_Edge& E2 = TopoDS::Edge(itL.Value());
- Standard_Integer iE2 = myDS->Shape(E2);
- Standard_Integer rE2 = myDS->AncestorRank(iE2);
- cout<<iE2<<"("<<rE2<<") ";
- }
- cout<<endl;
- }
- }
-#endif
-
for (itmapELE.Initialize(mapELE); itmapELE.More(); itmapELE.Next()) {
const TopoDS_Edge& E1 = TopoDS::Edge(itmapELE.Key());
Standard_Integer iE1 = myDS->Shape(E1);
#include <TopOpeBRepTool_ShapeTool.hxx>
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFK();
static TCollection_AsciiString PRODINP("dinp ");
#endif
#ifdef OCCT_DEBUG
if (closingedge) OS<<"on closing edge "; else OS<<"on edge "; TopAbs::Print(O,cout);
cout<<" of "<<I<<" : par : "<<Epar<<endl;
- TopOpeBRepDS_Transition T = TopOpeBRep_FFTransitionTool::ProcessLineTransition(*this,I,O);
+ TopOpeBRep_FFTransitionTool::ProcessLineTransition(*this,I,O);
OS<<"line transition ";
if (closingedge) OS<<"on closing edge "; else OS<<"on edge "; TopAbs::Print(O,cout);
- OS<<" of "<<I<<" : "; T.Dump(OS);OS<<endl;
+ OS<<" of "<<I<<endl;
#endif
return OS;
OS<<PRODINP<<"P"<<myIndex<<" "; OS<<P.X()<<" "<<P.Y()<<" "<<P.Z();
OS<<"; #draw"<<endl;
- if (TopOpeBRepDS_GettraceDSFK()) { Standard_Real u,v;
- ParametersOnS1(u,v); OS<<"u1,v1 : "<<u<<" "<<v; OS<<" ";
- ParametersOnS2(u,v); OS<<"u2,v2 : "<<u<<" "<<v; OS<<endl;
- }
-
if (IsVertexOnS1()) { OS<<"is vertex of 1"<<endl; }
if (IsVertexOnS2()) { OS<<"is vertex of 2"<<endl; }
if (IsMultiple()) { OS<<"is multiple"<<endl; }
#include <TopTools_IndexedMapOfShape.hxx>
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
extern Standard_Boolean TopOpeBRep_GetcontextNEWKP();
#endif
return sameuv;
}
-#ifdef OCCT_DEBUG
-//-------------------------------------------------------------------
-void FUNBREP_topokpartDEB
-(const Handle(TopOpeBRepDS_Interference)& /*Ifound*/,
- const TopOpeBRepDS_ListOfInterference& DSCIL,
- const TopOpeBRep_LineInter& L,
- const TopOpeBRep_VPointInter& VP,
- const TopOpeBRepDS_Transition& lasttransLine,
- const TopOpeBRepDS_DataStructure& /*BDS*/,
- const TopoDS_Shape& /*E*/,
- const TopoDS_Shape& /*F*/,
- const Standard_Real /*toluv*/,
- const Standard_Boolean CPIfound,
- const Standard_Boolean samepar,
- const Standard_Boolean couture,
- const Standard_Real& parline,
- const TopOpeBRepDS_Transition& transLine)
-//-------------------------------------------------------------------
-{
- Standard_Integer iVP = VP.Index();
- Standard_Boolean fermee = L.IsVClosed();
- Standard_Boolean onsort = (transLine.Orientation(TopAbs_OUT) == TopAbs_FORWARD);
- Standard_Boolean lastdefinie = ! lasttransLine.IsUnknown();
- Standard_Boolean lastonsort = Standard_False;
- if (lastdefinie) lastonsort = (lasttransLine.Orientation(TopAbs_OUT) == TopAbs_FORWARD);
-
- Standard_Boolean LITdefinie = Standard_False;
- Standard_Boolean LITonsort = Standard_False;
- TopOpeBRepDS_Transition LIT;
- Standard_Boolean nointerf = DSCIL.IsEmpty();
-
- if (nointerf) STATIC_lastVPind = 0;
- if (!nointerf) {
- const Handle(TopOpeBRepDS_Interference)& I = DSCIL.Last();
- LIT = I->Transition();
- LITdefinie = ! LIT.IsUnknown();
- if (LITdefinie) LITonsort = (LIT.Orientation(TopAbs_OUT) == TopAbs_FORWARD);
- }
-
- Standard_Boolean iswalki = (L.TypeLineCurve() == TopOpeBRep_WALKING);
- if (iswalki) cout<<"kpwalk ";
- else cout<<"kpglin ";
-
- cout<<"\tVP "<<iVP<<" : ";
-
- if (CPIfound && samepar) cout<<"trouve ("<<parline<<")";
- else if (CPIfound && !samepar) cout<<"trouve";
- else cout<<"non trouve";
-
- if (fermee) cout<<", fermee";
- else cout<<", ouverte";
-
- if (couture) cout<<", couture";
-
- if (onsort) cout<<", sortant";
- else cout<<", entrant";
-
- if (lastdefinie && lastonsort) cout<<", prec = sortant";
- else if (lastdefinie && !lastonsort) cout<<", prec = entrant";
- else cout<<", prec = ?";
-
- if (LITdefinie && LITonsort) cout<<", Lprec = sortant";
- else if (LITdefinie && !LITonsort) cout<<", Lprec = entrant";
- else cout<<", Lprec = ?";
- cout<<endl;
-
- if (!iswalki) {
- cout<<"kpglin ";
- Standard_Boolean hasfp = L.HasFirstPoint();
- Standard_Boolean haslp = L.HasLastPoint();
- Standard_Real f,l; L.Bounds(f,l);
- if (hasfp) cout<<"\thas fp "<<f;
- else cout<<"\thas NO fp";
- if (haslp) cout<<", has lp "<<l;
- else cout<<", has NO lp";
- cout<<endl;
- }
-}
-#endif
-
//----------------------------------------------------------------------
Standard_Boolean FUNBREP_topowalki_new
(const Handle(TopOpeBRepDS_Interference)& Ifound,const TopOpeBRepDS_ListOfInterference& DSCIL,const TopOpeBRep_LineInter& L,
TopOpeBRepDS_Transition& transLine)
//----------------------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF();
-#endif
-
if (L.TypeLineCurve() != TopOpeBRep_WALKING) {
Standard_ProgramError::Raise("FUNBREP_topowalki_new : line is not a walking");
return Standard_False;
Standard_Boolean samevponcouture = samepar && keep;
if (samevponcouture) {
keep = Standard_False;
-#ifdef OCCT_DEBUG
- if (trc) cout<<"is same vp on couture";
-#endif
}
}
TopOpeBRepDS_Transition& transLine)
//----------------------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceDSF();
-#endif
-
if (L.TypeLineCurve() != TopOpeBRep_WALKING) {
Standard_ProgramError::Raise("FUNBREP_topowalki : line is not a walking");
return Standard_False;
Standard_Boolean samevponcouture = samepar && couture;
if (keep && samevponcouture) {
keep = Standard_False;
-
-#ifdef OCCT_DEBUG
- if (trc) cout<<"is same vp on couture";
-#endif
}
if (keep) {
TopOpeBRepDS_Transition lasttransLine;
if (!DSCIL.IsEmpty()) lasttransLine = DSCIL.Last()->Transition(); // xpu12-12-97
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSF()) {
- FUNBREP_topokpartDEB(Ifound,DSCIL,L,VP,lasttransLine,BDS,E,F,toluv,
- CPIfound,samepar,couture,parline,transLine);
- }
-#endif
// A line is valid if at least it has VPi1 and VPi2 with i1 < i2 and :
// transition on line for VPi1 : OUT/IN and for VPi2 : IN/OUT.
cout<<TopOpeBRepDS::SPrint(k2,iv2,str);
cout<<TopOpeBRepDS::SPrint(TopOpeBRepDS::ShapeToKind(f2.ShapeType()),if2," de ")<<endl;
}
- ITF->Dump(cout,"# BREP_mergePDS resu ","\n");
}
#endif
#define M_REVERSED(st) (st == TopAbs_REVERSED)
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceISTO();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSP();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer i);
extern Standard_Boolean TopOpeBRep_GettraceNVP(Standard_Integer a,Standard_Integer b,Standard_Integer c,Standard_Integer d,Standard_Integer e);
Standard_Boolean GLOBAL_bvpr = Standard_False;
}
TopOpeBRepDS_ListIteratorOfListOfInterference itCPIL(DSCIL);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = Standard_False;
- if (trc) {TopOpeBRepDS_Dumper DSD(HDS); TCollection_AsciiString aa("DSCIL :");
- DSD.DumpLOI(DSCIL,cout,aa);}
-#endif
CPIfound = FF.GetGeometry(itCPIL,VP,PVIndex,PVKind);
if (CPIfound) ICPI = itCPIL.Value();
// NYI : compute uvtol with the original faces. By default, we set toluv = TolClass
Standard_Real toluv = 1.e-8;
Standard_Boolean keep = FUNBREP_topokpart(Ifound,DSCIL,L,VP,(*pDS),E,F,toluv,parline,ttransLine);
-
-#ifdef OCCT_DEBUG
- Standard_Integer trc=TopOpeBRepDS_GettraceDSF();
- if (trc){if(keep)cout<<"\t-> on garde";else cout<<"\t-> on jette";cout<<endl;}
-#endif
if (keep) {
keptVPnbr++;
}
#ifdef OCCT_DEBUG
- Standard_Boolean traceDSF = TopOpeBRepDS_GettraceDSF();
- Standard_Boolean traceDSP = TopOpeBRepDS_GettraceDSP();
Standard_Integer ili=myLine->Index(),ivp=iVP,isi=ShapeIndex;
- if(traceDSF || traceDSP){
- cout<<endl;
- cout<<"trc tnvp 1 "<<myexF1<<" "<<myexF2<<" "<<ili<<" "<<ivp<<" "<<isi;
- cout<<"; # VPonR "<<iVP<<" on "<<ShapeIndex<<" from "<<absindex<<endl;
- }
GLOBAL_bvpr = TopOpeBRep_GettraceNVP(myexF1,myexF2,ili,ivp,isi);
- if (TopOpeBRepDS_GettraceISTO()) {
- cout<<"f1,f2,l,vp,si : ";
- cout<<myexF1<<","<<myexF2<<","<<ili<<","<<ivp<<","<<isi<<endl;
- }
if (GLOBAL_bvpr) debvprmess(myexF1,myexF2,ili,ivp,isi);
- if (traceDSF){
- cout<<"VP is on";if (closing) cout<<" CLOSING";
- cout<<" edge "<<SIedgeIndex;
- if(isrest) cout<<" RESTRICTION"; cout<<endl;
- if (OOclosing) cout<<" on CLOSING OOedge "<<OOedgeIndex;
- if(OOisrest) cout<<" RESTRICTION"; cout<<endl;
- }
#endif
// degenerated edge processing
keepvpfirst = keepvpfirst && myLastVPison0;
//modified by NIZHNY-MKK Mon Jul 3 11:30:21 2000.END
if (keepvpfirst) transLine.Set(TopAbs_FORWARD);
-#ifdef OCCT_DEBUG
- if (traceDSF) cout<<"myLastVPison0 ->"<<endl;
-#endif
ret1 = Standard_False;
}
}
// -------------------
TopAbs_Orientation Transori = Trans.Orientation(TopAbs_IN);
TopOpeBRepDS_Transition transEdge = TopOpeBRep_FFTransitionTool::ProcessEdgeTransition(VP,ShapeIndex,Transori);
-#ifdef OCCT_DEBUG
- if(traceDSF){cout<<"trans edge on f"<<ShapeIndex<<" / f"<<OOShapeIndex<<" : ";
- transEdge.Dump(cout);cout<<endl;}
-#endif
-
Standard_Boolean Tunknown = FDS_hasUNK(transEdge);
TopOpeBRepDS_Point PDS = TopOpeBRep_PointGeomTool::MakePoint(VP);// <VP>'s geometry
TopOpeBRepDS_ListOfInterference lITOOFonVP; // {I on <edge> = (T on <OOface>, G on <VP>, S)}
newtransEdge = newtransEdge || closing || OOclosing;
newtransEdge = newtransEdge && (!myLineINL);
if (newtransEdge){
-#ifdef OCCT_DEBUG
- Standard_Integer iedge =
-#endif
- myDS->Shape(edge);
+ myDS->Shape(edge);
newtransEdge = !found;
if (found) {
// Getting first transition found
if (ok) {transEdge.Before(Tr.Before()); transEdge.After(Tr.After());}
newtransEdge = ok;
}
-#ifdef OCCT_DEBUG
- if (traceDSF && (found || newtransEdge))
- {if (found) cout<<"*-> found "; if (newtransEdge) cout<<"*-> new ";
- cout<<"transEdge (edge "<<iedge<<",face"<<iOOFace<<") = "; TopAbs::Print(transEdge.Before(),cout);
- cout<<" ";TopAbs::Print(transEdge.After(),cout);cout<<endl;}
-#endif
} // newtransEdge
Standard_Boolean tredunk = transEdge.IsUnknown();
// OO*** : data issued from other shape
if (SIedgeIndex == 0) SIedgeIndex = myDS->AddShape(edge,ShapeIndex);
-#ifdef OCCT_DEBUG
- Standard_Boolean trce = TopOpeBRepDS_GettraceSPSX(SIedgeIndex); if(trce) debarc(SIedgeIndex);
-#endif
Standard_Boolean SIisvertex = VP.IsVertex(ShapeIndex);
Standard_Boolean OOisvertex = VP.IsVertex(OOShapeIndex);
// Gfound = VP corresponds with an existing geometry of ShapeIndex
Standard_Boolean Gfound = ( EPIfound || CPIfound );
#ifdef OCCT_DEBUG
- Standard_Boolean trcpv = TopOpeBRepDS_GettraceSPSX(PVIndex);
- Standard_Boolean ispoint = (PVKind == TopOpeBRepDS_POINT);
- if(trcpv && ispoint) debpoint(PVIndex);
- if(trcpv && !ispoint) debvertex(PVIndex);
if (GLOBAL_bvpr) debvprmess(myexF1,myexF2,ili,ivp,isi);
#endif
}
}
if ( correctON ) {
-#ifdef OCCT_DEBUG
- Standard_Boolean trcooe=TopOpeBRepDS_GettraceSPSX(OOedgeIndex);if (trcooe) debooarc(OOedgeIndex);
-#endif
if (OOedgeIndex == 0) OOedgeIndex = myDS->AddShape(OOedge,OOShapeIndex);
// VP a ete classifie ON sur l'edge <OOedge>.
TopAbs_State stb,sta; ok = MKT.MkTonE(stb,sta);
if (ok) {
tOOedge.Before(stb); tOOedge.After(sta);
-#ifdef OCCT_DEBUG
- if(traceDSF){
- cout<<"* !on2edges && TopAbs_ON *\n";
- if(OOisrest) cout<<"* edge "<<OOedgeIndex<<" RESTRICTION *\n";
- cout<<"Transition sur <OOedge> "<<OOedgeIndex<<" croisant <edge> "<<SIedgeIndex<<" ";
- TopAbs::Print(edgeori,cout);cout<<" ";tOOedge.Dump(cout);cout<<endl;}
-#endif
Handle(TopOpeBRepDS_Interference) OOEPIe;
{
if (iSIFace == 0) iSIFace = myDS->AddShape(Face,ShapeIndex);
#define M_REVERSED(st) (st == TopAbs_REVERSED)
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer i1);
Standard_EXPORT void debarc(const Standard_Integer i);
Standard_EXPORT void debooarc(const Standard_Integer i);
#endif
if (iOOFace == 0) iOOFace = myDS->AddShape(OOFace,OOShapeIndex);
// current VPoint is on <edge>
-#ifdef OCCT_DEBUG
- Standard_Integer SIedgeIndex = 0;
-#endif
const TopoDS_Edge& edge = TopoDS::Edge(VP.Edge(ShapeIndex));
if (!myDS->HasShape(edge)) myDS->AddShape(edge,ShapeIndex);
-#ifdef OCCT_DEBUG
- else SIedgeIndex = myDS->Shape(edge);
-#endif
Standard_Real paredge = VP.EdgeParameter(ShapeIndex);
else OOedgeIndex = myDS->AddShape(OOedge,OOShapeIndex);
}
-#ifdef OCCT_DEBUG
- Standard_Boolean traceDSF = TopOpeBRepDS_GettraceDSF();
- Standard_Boolean trce = TopOpeBRepDS_GettraceSPSX(SIedgeIndex); if(trce) debarc(SIedgeIndex);
- Standard_Boolean trcooe = TopOpeBRepDS_GettraceSPSX(OOedgeIndex); if(trcooe) debooarc(OOedgeIndex);
-#endif
-
// ===================================================================
// --- Edge/(POINT,VERTEX) Interference (EPI) creation ---
// ===================================================================
// transEdge should be INTERNAL/EXTERNAL.
Standard_Boolean Tunk = transEdge.IsUnknown();
-#ifdef OCCT_DEBUG
- if (!Tunk && traceDSF) cout<<"-> on closing : transAdd = "<<endl;
-#endif
TopOpeBRepDS_Transition transAdd;
Standard_Boolean newtransEdge = Tunk;
if (newtransEdge) transAdd = GetEdgeTrans(VP,PVKind,PVIndex,ShapeIndex,OOFace);
// modified by NIZHNY-MKK Tue Nov 21 17:30:27 2000.END
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDEGEN();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
Standard_EXPORT Standard_Boolean FUN_debnull(const TopoDS_Shape& s);
#endif
Standard_Boolean& EPIfound, Handle(TopOpeBRepDS_Interference)& IEPI, // out
Standard_Boolean& CPIfound, Handle(TopOpeBRepDS_Interference)& ICPI) // out
{
-#ifdef OCCT_DEBUG
- Standard_Boolean traceDSF = TopOpeBRepDS_GettraceDSF();
- Standard_Boolean traceDEGEN = TopOpeBRepDS_GettraceDEGEN();
-#endif
-
if (PVIndex == 0) FUN_VPIndex ((*this),(*myLine),VP,ShapeIndex,myHDS,myDSCIL, //in
PVKind,PVIndex, // out
EPIfound,IEPI, // out
if (rankFi == 1) Fi = myF1;
else Fi = myF2;
Standard_Integer iFi = myDS->AddShape(Fi,rankFi);
-#ifdef OCCT_DEBUG
- Standard_Integer iEd =
-#endif
- myDS->AddShape(dgEd,rankdg);
+ myDS->AddShape(dgEd,rankdg);
// Standard_Integer iOOEi = 0;
// if (hasOOEi) iOOEi = myDS->AddShape(OOEi,rankFi);
-#ifdef OCCT_DEBUG
- Standard_Boolean trace = traceDSF || traceDEGEN;
- if (trace) cout<<" VP is on degenerated edge "<<iEd<<" :"<<endl;
-#endif
Standard_Integer rkv = myDS->AncestorRank(myDS->Shape(PVIndex));
if ((makeI == MKI1)||(makeI == MKI12)) {
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepBuild_GettraceAREA();
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
#endif
//=======================================================================
#include <TopOpeBRepBuild_LoopClassifier.hxx>
#include <TopOpeBRepBuild_LoopSet.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-#endif
-
//=======================================================================
//function : TopOpeBRepBuild_AreaBuilder
//purpose :
"AreaBuilder : Position Unknown");
}
else {
-#ifdef OCCT_DEBUG
- if ( TopOpeBRepDS_GettraceSTRANGE() ) {
- cout<<"AreaBuilder : state "; TopAbs::Print(state,cout);
- cout<<" taken as "; TopAbs::Print(newstate,cout); cout<<endl;
- }
-#endif
state = newstate;
}
}
//
#ifdef OCCT_DEBUG
Standard_Boolean tSE = TopOpeBRepBuild_GettraceSPF();
- Standard_Boolean tCU = TopOpeBRepBuild_GettraceCU();
- Standard_Boolean NtCUV = !TopOpeBRepBuild_GettraceCUV();
#endif
//
TopOpeBRepDS_CurveIterator SCurves(HDS->SurfaceCurves(iS));
const TopOpeBRepDS_Curve& CDS = HDS->Curve(iC);
#ifdef OCCT_DEBUG
if (tSE) cout<<endl<<"BuildFaces : C "<<iC<<" on S "<<iS<<endl;
- if (tCU) { CDS.Dump(cout,iC,NtCUV); cout<<endl; }
#endif
TopoDS_Shape anEdge;
TopTools_ListIteratorOfListOfShape Iti(NewEdges(iC));
TopOpeBRepDS_CurveIterator FCurves = myDataStructure->FaceCurves(aFace);
for (; FCurves.More(); FCurves.Next()) {
Standard_Integer iC = FCurves.Current();
-#ifdef OCCT_DEBUG
- Standard_Boolean tCU = TopOpeBRepBuild_GettraceCU();
- Standard_Boolean NtCUV = !TopOpeBRepBuild_GettraceCUV();
- if(tCU) {cout<<endl;myDataStructure->Curve(iC).Dump(cout,iC,NtCUV);}
-#endif
const TopTools_ListOfShape& LnewE = NewEdges(iC);
for (TopTools_ListIteratorOfListOfShape Iti(LnewE); Iti.More(); Iti.Next()) {
anEdge = Iti.Value();
#ifdef OCCT_DEBUG
Standard_Integer iFOR;Standard_Boolean tFOR=myPB->GtraceSPS(FOR,iFOR);
if (tFOR) debfillonf(iFOR);
- if (tFOR) {cout<<endl<<"LI on F"<<iFOR<<":"<<endl;
- for (TopOpeBRepDS_ListIteratorOfListOfInterference iit(lFEI); iit.More(); iit.Next())
- {iit.Value()->Dump(cout);cout<<endl;}}
+ if (tFOR) cout<<endl<<"LI on F"<<iFOR<<endl;
#endif
for (TopOpeBRepDS_ListIteratorOfListOfInterference itI(lFEI); itI.More(); itI.Next()){
// Standard_Boolean tE=myPB->GtraceSPS(GI);
// Standard_Boolean tEFOR = (tE && tFOR);
if (tFOR) {debON2d(iFOR);}
- if (tFOR) {I->Dump(cout);cout<<endl;}
#endif
Standard_Integer iFCX=SI;
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepBuild_GettracePURGE();
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-#include <TopOpeBRepDS_DSX.hxx>
void debifb() {}
#endif
void TopOpeBRepBuild_FaceBuilder::InitFaceBuilder(TopOpeBRepBuild_WireEdgeSet& WES,const TopoDS_Shape& F,const Standard_Boolean ForceClass)
{
myFace = TopoDS::Face(F);
-#ifdef OCCT_DEBUG
- Standard_Boolean deb = TopOpeBRepDS_GettraceSPSX(myFace);
- if (deb) debifb();
-#endif
MakeLoops(WES);
TopOpeBRepBuild_BlockBuilder& BB = myBlockBuilder;
TopOpeBRepBuild_WireEdgeClassifier WEC(F,BB);
{
// prequesitory : edges described by <mapVon1Edge> are not closed,not degenerated
#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSTRANGE();
if (TopOpeBRepBuild_GettracePURGE()) {
cout<<endl<<"* CorrectGclosedWire :"<<endl<<endl;
- trc = Standard_True;
}
#endif
TopoDS_Vertex newVref = TopoDS::Vertex(aLocalShape);
// TopoDS_Vertex newVref = TopoDS::Vertex(Vref.Oriented(V.Orientation()));
BB.Add(E,newVref);
-#ifdef OCCT_DEBUG
- Standard_Integer iV = i,iVref = mapVVref.FindIndex(Vref),iE = mapVon1Edge.FindIndex(V);
- if (trc) cout << " replacing V "<<iV<<" with V "<<iVref<<" on edge "<<iE<<endl;
-#endif
TopOpeBRepDS_BuildTool BT;
BT.Parameter(E,newVref,paronE);
}
const TopOpeBRepDS_ListOfInterference& LICur = tki.Value(Kcur,Gcur);
Standard_Boolean point = (Kcur == TopOpeBRepDS_POINT); //xpu170498
Standard_Boolean vertex = (Kcur == TopOpeBRepDS_VERTEX);//xpu170498
-#ifdef OCCT_DEBUG
-// Standard_Integer nLICur = LICur.Extent();
- Standard_Boolean trcI = Standard_False;
- if(trcI) {TopOpeBRepDS_Dumper DSD(myDataStructure); TCollection_AsciiString aa("lI");
- aa += TCollection_AsciiString(Gcur); DSD.DumpLOI(LICur,cout,aa);}
-#endif
-
TopoDS_Shape vGsd;
if (vertex) FUN_ds_getoov(BDS.Shape(Gcur), myDataStructure, vGsd); //xpu221098
TopOpeBRepDS_ListOfInterference li; li.Append(newI); TopOpeBRepDS_PointIterator itCur(li);
GFillPointTopologyPVS(E,itCur,G,PVS);
-#ifdef OCCT_DEBUG
- if(tSPS) {newI->Dump(cout,"\nnewinterf ","\n\n"); debfillp2(iEDS);}
-#endif
{tki.Next(); continue;}
} // isSE
TopAbs_ShapeEnum SB1,SA1;Standard_Integer IB1,IA1;TopOpeBRepDS_Kind GT1,ST1;Standard_Integer G1,S1;
FDS_Idata(I1,SB1,IB1,SA1,IA1,GT1,G1,ST1,S1);
-#ifdef OCCT_DEBUG
- if(tSPS) {I1->Dump(cout,"\n? keepinterf ","\n\n"); debfillp2(iEDS);}
-#endif
-
Standard_Boolean keepinterf1 = Standard_False;
if (isEd) {
keepinterf1 = Standard_True;
Standard_Boolean id2d = (I1 == i2d);
if (tSPS) {
cout<<"DEB : GFillPointTopologyPVS E"<<iEDS<<" has2d3d"<<endl;
- i2d->Dump(cout,"2d : ","\n");
- i3d->Dump(cout,"3d : ","\n");
- I1->Dump (cout,"I1 : ","\n");
if (id3d) cout<<"--> Interference 3d ";
if (id2d) cout<<"--> Interference 2d ";
if (keepinterf1) cout<<" traitee"<<endl;
#endif
#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_DSX.hxx>
extern void* GFABUMAKEFACEPWES_DEB;
#define DEBSHASET(sarg,meth,shaset,str) TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str);
Standard_Integer GLOBAL_iexE = 0;
// {I = (T(F),ES,FTRA)} / Fsdm F and ES interfers with E which has splits ON
// E is edge of F
{
-#ifdef OCCT_DEBUG
- Standard_Integer iF;Standard_Boolean tF=BU.GtraceSPS(F,iF);
-#endif
-
const TopOpeBRepDS_DataStructure& BDS = BU.DataStructure()->DS();
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(E);
Standard_Integer IE = BDS.Shape(E);
if (ok) {
newT.Index(ITRA); TopOpeBRepDS_Config C = TopOpeBRepDS_SAMEORIENTED;
Handle(TopOpeBRepDS_Interference) newI = TopOpeBRepDS_InterferenceTool::MakeFaceEdgeInterference(newT,ITRA,IE,Standard_True,C);
-#ifdef OCCT_DEBUG
- if (tF) {cout<<"f"<<IF<<" + ";newI->Dump(cout);cout<<endl;}
-#endif
pDS2d->AddShapeInterference(F,newI);
}
}
if (ok) {
newT.Index(IF); TopOpeBRepDS_Config C = TopOpeBRepDS_SAMEORIENTED;
Handle(TopOpeBRepDS_Interference) newI = TopOpeBRepDS_InterferenceTool::MakeFaceEdgeInterference(newT,IF,IE,Standard_False,C);
-#ifdef OCCT_DEBUG
- if (tF) {cout<<"f"<<ITRA<<" + ";newI->Dump(cout);cout<<endl;}
-#endif
pDS2d->AddShapeInterference(FTRA,newI);
}
if (ok) {
newT.Index(IF); TopOpeBRepDS_Config C = TopOpeBRepDS_SAMEORIENTED;
Handle(TopOpeBRepDS_Interference) newI = TopOpeBRepDS_InterferenceTool::MakeFaceEdgeInterference(newT,IF,S,Standard_True,C);
-#ifdef OCCT_DEBUG
- if (tF) {cout<<endl<<"f"<<ITRA<<" + ";newI->Dump(cout);cout<<endl;}
-#endif
pDS2d->AddShapeInterference(FTRA,newI);
}
if (ok) {
newT.Index(ITRA); TopOpeBRepDS_Config C = TopOpeBRepDS_SAMEORIENTED;
Handle(TopOpeBRepDS_Interference) newI = TopOpeBRepDS_InterferenceTool::MakeFaceEdgeInterference(newT,ITRA,S,Standard_False,C);
-#ifdef OCCT_DEBUG
- if (tF) {cout<<"f"<<iF<<" + ";newI->Dump(cout);cout<<endl;}
-#endif
pDS2d->AddShapeInterference(F,newI);
}
}
#ifdef OCCT_DEBUG
cout<<"o-o GridFF ffil F"<<ifil<<" se E"<<iEOR<<" / "<<iWESF<<" ";
TopAbs::Print(TB1,cout);cout.flush();
- Standard_Boolean tse = TopOpeBRepDS_GettraceSPSX(iEOR);
- TopOpeBRepDS_SettraceSPSX(iEOR,Standard_True);
if (!ftg) {cout<<" : !ftg --> "; GKeepShape(EOR,LSclass,TB1);cout.flush();}
else {cout<<" : ftg --> non gardee"<<endl;cout.flush();}
- TopOpeBRepDS_SettraceSPSX(iEOR,tse);
#endif
}
#ifdef OCCT_DEBUG
#define DEBSHASET(sarg,meth,shaset,str) TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str);
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
Standard_EXPORT void debsplitf(const Standard_Integer i){cout<<"++ debsplitf "<<i<<endl;}
Standard_EXPORT void debspanc(const Standard_Integer i){cout<<"++ debspanc "<<i<<endl;}
Standard_Integer GLOBAL_iexF = 0;
if (!ok) return Standard_False; // nyi FUN_Raise
Standard_Integer iEinterf=0; Standard_Integer iG = FUN_getG(p3d,EPIlist,HDS,iEinterf);
if (iG == 0) {
-#ifdef OCCT_DEBUG
- Standard_Boolean strange = TopOpeBRepDS_GettraceSTRANGE();
- if (strange) cout<<"strange : FUN_EPIforEvisoONperiodicF"<<endl;
-#endif
return Standard_False;
}
if (HDS->Shape(iEinterf).ShapeType() != TopAbs_EDGE) iEinterf = 0;
TopOpeBRepDS_Kind GT,ST;Standard_Integer GI,SI;FDS_data(SSI,GT,GI,ST,SI);
const TopoDS_Face& FS = TopoDS::Face( HDS->Shape(SI));
-#ifdef OCCT_DEBUG
- Standard_Integer iFS =
-#endif
- HDS->Shape(FS);
+ HDS->Shape(FS);
// Standard_Boolean FSper = FUN_periodicS(FS);
Standard_Boolean FSper = FUN_tool_closedS(FS);
if (!FSper) continue;
const TopoDS_Edge& EG = TopoDS::Edge(HDS->Shape(GI));
-#ifdef OCCT_DEBUG
- Standard_Integer iEG =
-#endif
- HDS->Shape(EG);
+ HDS->Shape(EG);
Standard_Boolean isrest = HDS->DS().IsSectionEdge(EG);
if (!isrest) continue;
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
TopOpeBRepDS_ListOfInterference EPIlist; FUN_getEPIonEds(FS,HDS,EPIlist);
TopOpeBRepDS_ListOfInterference loCPI;
-#ifdef OCCT_DEBUG
- Standard_Boolean recadre =
-#endif
- FUN_EPIforEvisoONperiodicF(EG,FS,EPIlist, HDS,loCPI);
+ FUN_EPIforEvisoONperiodicF(EG,FS,EPIlist, HDS,loCPI);
TopOpeBRepDS_ListOfInterference& lIEG = BDS.ChangeShapeInterferences(EG);
lIEG.Append(loCPI);
-
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSTRANGE();
- if (trc) {cout<<"!! recadre is "; if (!recadre) cout<<"not ";
- cout<<"done on face FS "<<iFS<<" for edge "<<iEG<<endl;}
-#endif
} // ILI
return Standard_True;
}
#include <TopOpeBRepBuild_WireEdgeSet.hxx>
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSXX(const Standard_Integer,const Standard_Integer);
static TCollection_AsciiString PRODINS("dins ");
#endif
//function : GtraceSPS
//purpose :
//=======================================================================
-#ifdef OCCT_DEBUG
-Standard_Boolean TopOpeBRepBuild_Builder::GtraceSPS(const Standard_Integer i,
- const Standard_Integer j) const
-#else
Standard_Boolean TopOpeBRepBuild_Builder::GtraceSPS(const Standard_Integer ,
const Standard_Integer ) const
-#endif
{
- Standard_Boolean b = Standard_False;
-#ifdef OCCT_DEBUG
- b = TopOpeBRepDS_GettraceSPSXX(i,j);
-#endif
- return b;
+ return Standard_False;
}
//=======================================================================
//function : GtraceSPS
//purpose :
//=======================================================================
-#ifdef OCCT_DEBUG
-Standard_Boolean TopOpeBRepBuild_Builder::GtraceSPS(const TopoDS_Shape& S,
- Standard_Integer& IS) const
-#else
Standard_Boolean TopOpeBRepBuild_Builder::GtraceSPS(const TopoDS_Shape&,
Standard_Integer& IS) const
-#endif
{
- IS = 0; Standard_Boolean b = Standard_False;
-#ifdef OCCT_DEBUG
- if ( ! myDataStructure.IsNull() ) {
- if ( ! S.IsNull() ) {
- IS = myDataStructure->Shape(S);
- b = TopOpeBRepDS_GettraceSPSX(IS);
- }
- }
-#endif
- return b;
+ IS = 0;
+ return Standard_False;
}
#ifdef OCCT_DEBUG
extern Standard_Boolean TopOpeBRepBuild_GettraceSPS();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
Standard_EXPORT void debsplitse(const Standard_Integer) {}
Standard_EXPORT void debsplitsemess(const Standard_Integer i,const TCollection_AsciiString& s = "");
Standard_EXPORT void debsplitsemess(const Standard_Integer i,const TCollection_AsciiString& s){cout<<"+++ debsplitse "<<s<<" E"<<i<<endl;debsplitse(i);}
const TopOpeBRepDS_DataStructure& BDS = myDataStructure->DS();
Standard_Integer i,n = BDS.NbSectionEdges();
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceDSNC() && !mySplitSectionEdgesDone)
- cout<<"TopOpeBRepBuild_Builder::SSE : compute "<<n<<" section edges"<<endl;
-#endif
-
+
for (i = 1; i <= n; i++) { // 1
const TopoDS_Edge& E = TopoDS::Edge(BDS.SectionEdge(i));
if(E.IsNull()) continue;
#include <TopOpeBRepBuild_define.hxx>
#ifdef OCCT_DEBUG
-#define TSTRA TopOpeBRepDS_GettraceSTRANGE()
static TCollection_AsciiString PRODINS("dins ");
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
#endif
//Standard_IMPORT extern TopOpeBRepBuild_Builder* GLOBAL_PBUILDER;
}
} //UNKNOWN
- if (state == TopAbs_UNKNOWN) {
-#ifdef OCCT_DEBUG
- if (TSTRA) cout<<"TopOpeBRepBuild_Builder::WES::Compare UNKNOWN -> ShapeClassifier "<<endl;
-#endif
- }
-
if (state == TopAbs_UNKNOWN) {
TopoDS_Shape s1 = LoopToShape(L1); if (s1.IsNull()) return state;
TopoDS_Shape s2 = LoopToShape(L2); if (s2.IsNull()) return state;
extern Standard_Boolean TopOpeBRepBuild_GetcontextNOPURGE();
extern Standard_Boolean TopOpeBRepBuild_GetcontextNOCORRISO();
extern Standard_Boolean TopOpeBRepBuild_GettraceCHK();
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
#define DEBSHASET(sarg,meth,shaset,str) \
TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str);
Standard_EXPORT void debgfabu(const Standard_Integer i) {cout<<"++ debgfabu "<<i<<endl;}
Standard_Boolean topurge = FUN_purgeFon1nonoriE(newFace);
if (topurge) {
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceSTRANGE())
- cout<<"Builder::GFABUMakeFaces -> purgeFon1nonoriE\n";
-#endif
continue;
}
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
Standard_EXPORT void debgsobu(const Standard_Integer /*iSO*/) {}
#endif
(const TopoDS_Shape& SOF,TopOpeBRepBuild_SolidBuilder& SOBU,TopTools_ListOfShape& LOSO)
{
#ifdef OCCT_DEBUG
- Standard_Boolean trcso = TopOpeBRepDS_GettraceSTRANGE();
Standard_Integer iSO; Standard_Boolean tSPS = GtraceSPS(SOF,iSO);
if(tSPS){GdumpSHA(SOF, (char *) "#--- GSOBUMakeSolids ");cout<<endl;}
if(tSPS){GdumpSOBU(SOBU);debgsobu(iSO);}
TopExp_Explorer ex(newSolid,TopAbs_VERTEX);
Standard_Boolean isempty = ex.More();
if (!isempty) {
-#ifdef OCCT_DEBUG
- if (trcso) cout <<"TopOpeBRepBuild_Builder::GSOBUMakeSolids ->EMPTY SOLID\n";
-#endif
continue;
}
TopOpeBRepDS_DRAW.hxx
TopOpeBRepDS_DSS.cxx
TopOpeBRepDS_DSS.hxx
-TopOpeBRepDS_DSX.hxx
TopOpeBRepDS_Dumper.cxx
TopOpeBRepDS_Dumper.hxx
TopOpeBRepDS_Edge3dInterferenceTool.cxx
TopOpeBRepDS_ProcessFaceInterferences.cxx
TopOpeBRepDS_ProcessInterferencesTool.cxx
TopOpeBRepDS_ProcessInterferencesTool.hxx
-TopOpeBRepDS_reDEB.cxx
-TopOpeBRepDS_reDEB.hxx
TopOpeBRepDS_redu.cxx
TopOpeBRepDS_Reducer.cxx
TopOpeBRepDS_Reducer.hxx
TopOpeBRepDS_TKI.hxx
TopOpeBRepDS_TOOL.cxx
TopOpeBRepDS_TOOL.hxx
-TopOpeBRepDS_trace.cxx
-TopOpeBRepDS_traceDSX.cxx
-TopOpeBRepDS_traceDSX.hxx
TopOpeBRepDS_Transition.cxx
TopOpeBRepDS_Transition.hxx
#include <TopOpeBRepTool_ShapeTool.hxx>
// includes especially needed by the static Project function
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceDSNC();
-extern Standard_Boolean TopOpeBRepDS_GettraceBUTO();
-extern Standard_Boolean TopOpeBRepDS_GettraceTRPE();
-extern Standard_Boolean TopOpeBRepDS_GettraceSANTRAN();
-static void DUMPCURVES(const Handle(Geom_Curve)& C3D,const TopOpeBRepDS_Curve& C)
-{
- if ( !C3D.IsNull() ) {
- Standard_Real dp1 = C3D->FirstParameter();
- Standard_Real dp2 = C3D->LastParameter();
- cout<<"TopOpeBRepDS_BuildTool : C3D = "<<dp1<<","<<dp2<<endl;
- }
- if ( !C.Curve1().IsNull() ) {
- Standard_Real dp1 = C.Curve1()->FirstParameter();
- Standard_Real dp2 = C.Curve1()->LastParameter();
- cout<<"TopOpeBRepDS_BuildTool : PC1 = "<<dp1<<","<<dp2<<endl;
- }
- if ( !C.Curve2().IsNull() ) {
- Standard_Real dp1 = C.Curve2()->FirstParameter();
- Standard_Real dp2 = C.Curve2()->LastParameter();
- cout<<"TopOpeBRepDS_BuildTool : PC2 = "<<dp1<<","<<dp2<<endl;
- }
-}
-#endif
-
#ifdef DRAW
#include <TopOpeBRepDS_DRAW.hxx>
#include <Geom2d_Curve.hxx>
#endif
-//-----------------------------------------------------------------------
-//function : PrintSurface
-//purpose : print the name of a surface on a stream
-// a mettre dans TopOpeBRepDS_Dumper.cxx NYI
-//-----------------------------------------------------------------------
-
-#ifdef OCCT_DEBUG
-static Standard_OStream& PrintSurface(const TopoDS_Face& F, Standard_OStream& s)
-{
- BRepAdaptor_Surface STA_Surface(F);
- GeomAbs_SurfaceType t = STA_Surface.GetType();
- switch(t) {
- case GeomAbs_Plane : s<<"PLANE"; break;
- case GeomAbs_Cylinder : s<<"CYLINDER"; break;
- case GeomAbs_Cone : s<<"CONE"; break;
- case GeomAbs_Sphere : s<<"SPHERE"; break;
- case GeomAbs_Torus : s<<"TORUS"; break;
- case GeomAbs_BezierSurface : s<<"BEZIERSURFACE"; break;
- case GeomAbs_BSplineSurface : s<<"BSPLINESURFACE"; break;
- case GeomAbs_SurfaceOfRevolution : s<<"SURFACEOFREVOLUTION"; break;
- case GeomAbs_SurfaceOfExtrusion : s<<"SURFACEOFEXTRUSION"; break;
- case GeomAbs_OtherSurface : default : s<<"OTHERSURFACE"; break;
- }
- return s;
-}
-#endif
-
Standard_EXPORT Handle(Geom2d_Curve) BASISCURVE2D(const Handle(Geom2d_Curve)& C);
-//-----------------------------------------------------------------------
-//function : GetOrigin
-//purpose : a mettre dans TopOpeBRepDS_Dumper.cxx NYI
-//-----------------------------------------------------------------------
-
-#ifdef OCCT_DEBUG
-static Standard_Boolean GetOrigin(const Handle(Geom2d_Curve)& PCIN, gp_Pnt2d& o)
-{
- if (PCIN.IsNull()) return Standard_False;
- Handle(Geom2d_Curve) PC = ::BASISCURVE2D(PCIN);
- if (PC.IsNull()) return Standard_False;
-
- Handle(Standard_Type) T = PC->DynamicType();
- if ((T==STANDARD_TYPE(Geom2d_Circle)) ||
- (T==STANDARD_TYPE(Geom2d_Ellipse)) ||
- (T==STANDARD_TYPE(Geom2d_Parabola)) ||
- (T==STANDARD_TYPE(Geom2d_Hyperbola))) {
- o = Handle(Geom2d_Conic)::DownCast(PC)->Location();
- return Standard_True;
- }
- else if (T==STANDARD_TYPE(Geom2d_Line)) {
- o = Handle(Geom2d_Line)::DownCast(PC)->Location();
- return Standard_True;
- }
- else {
- return Standard_False;
- }
-// return Standard_False;
-}
-#endif
-
-//-----------------------------------------------------------------------
-//function : GetOrigin
-//purpose : a mettre dans TopOpeBRepDS_Dumper.cxx NYI
-//-----------------------------------------------------------------------
-
-#ifdef OCCT_DEBUG
-static Standard_Boolean GetOrigin(const Handle(Geom_Curve)& CIN, gp_Pnt& o)
-{
- if (CIN.IsNull()) return Standard_False;
- Handle(Geom_Curve) C = TopOpeBRepTool_ShapeTool::BASISCURVE(CIN);
- if (C.IsNull()) return Standard_False;
-
- Handle(Standard_Type) T = C->DynamicType();
- if ((T==STANDARD_TYPE(Geom_Circle)) ||
- (T==STANDARD_TYPE(Geom_Ellipse)) ||
- (T==STANDARD_TYPE(Geom_Parabola)) ||
- (T==STANDARD_TYPE(Geom_Hyperbola))) {
- o = Handle(Geom_Conic)::DownCast(C)->Location();
- return Standard_True;
- }
- else if (T==STANDARD_TYPE(Geom_Line)) {
- o = Handle(Geom_Line)::DownCast(C)->Position().Location();
- return Standard_True;
- }
- else {
- return Standard_False;
- }
-}
-#endif
-
Standard_Boolean FUN_UisoLineOnSphe
(const TopoDS_Shape& F,
const Handle(Geom2d_Curve)& PC)
myBuilder.MakeVertex(TopoDS::Vertex(V),P.Point(),P.Tolerance());
}
-#ifdef OCCT_DEBUG
-//-----------------------------------------------------------------------
-static Standard_OStream& DUMPPNT(const gp_Pnt& P, Standard_OStream& OS)
-//-----------------------------------------------------------------------
-{ OS<<P.X()<<" "<<P.Y()<<" "<<P.Z(); return OS; }
-#endif
-
//=======================================================================
//function : MakeEdge
//purpose :
if (!BSC.IsNull()) {
if (BSC->Degree() == 1) {
myBuilder.Range(TopoDS::Edge(E),1,BSC->NbPoles());
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO()) {
- cout<<endl<<"TopOpeBRepDS_BuildTool : ";
- cout<<"new range of "<< 1 <<" "<<BSC->NbPoles()<<endl;
- }
-#endif
}
}
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO()) {
- cout<<"TopOpeBRepDS_BuildTool : ";
- cout<<"vertices on parameter "<<first<<endl;
- cout<<" point is "; DUMPPNT(P,cout); cout<<endl;
- }
-#endif
}
}
Standard_Boolean rangedef = C.Range(first,last);
if (rangedef) {
Range(E,first,last);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO()) {
- cout<<"TopOpeBRepDS_BuildTool : ";
- cout<<"set edge range : "<<first<<" "<<last<<endl;
- }
-#endif
}
}
}
// newtol=tol3d;
// if (r1>newtol) newtol=r1;
// if (r2>newtol) newtol=r2;
-//#ifdef OCCT_DEBUG
-// if (TopOpeBRepDS_GettraceDSNC()) cout<<"newtol = "<<newtol<<endl;
-//#endif
// newtol *= 1.5;
inewC = HDS->MakeCurve(C,newC1);
TopOpeBRepDS_Curve& newC = HDS->ChangeCurve(inewC);
-#ifdef OCCT_DEBUG
-// Standard_Boolean tDSNC = TopOpeBRepDS_GettraceDSNC();
- Standard_Boolean tBUTO = TopOpeBRepDS_GettraceBUTO();
-#endif
-
// C1 curves have been approximated by BSplines of degree 1 :
// compute new geometry on curves.
TopoDS_Vertex Vmin,Vmax;Standard_Real parmin,parmax;
GetOrientedEdgeVertices(E,Vmin,Vmax,parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO) cout<<"Recompute1 min,max = "<<parmin<<","<<parmax<<endl;
- if (tBUTO) DUMPCURVES(C3D,C);
-#endif
-
Handle(Geom_Curve) C3Dnew;
Handle(Geom2d_Curve) PC1new;
Handle(Geom2d_Curve) PC2new;
Standard_Real newtol,newparmin,newparmax;
// MSV Nov 12, 2001: if approx failed than leave old curves of degree 1
if (!approxMade) {
-#ifdef OCCT_DEBUG
- cout<<"TopOpeBRepDS_BuildTool::ApproxCurves : approx failed, leave curves of degree 1"
- <<endl;
-#endif
newtol = BRep_Tool::Tolerance(E);
newparmin = parmin;
newparmax = parmax;
Standard_Boolean sam = P3D.IsEqual(P3DC3D,tol);
PCreversed = !sam;
-#ifdef OCCT_DEBUG
-#ifdef DRAW
- Standard_Boolean tBUTO = TopOpeBRepDS_GettraceBUTO();
- if (tBUTO) {FUN_draw(P3DC3D); FUN_draw(P3D);}
-#endif
-#endif
-
if ( PCreversed ) {
Handle(Geom2d_Curve) PC = ::BASISCURVE2D(PCnew);
if (!PC.IsNull()) {
if (!FUN_getUV(surf,C3D,par3dsup,usup,vsup)) return Standard_False;
Standard_Real tol = Precision::Parametric(tol3d);
if (Abs(uinf-usup) > tol) return Standard_False;
-#ifdef OCCT_DEBUG
-// Standard_Real deltav = vsup-vinf;
-#endif
Standard_Boolean isvgrowing = (vsup - vinf > -tol);
gp_Dir2d vdir;
if (!PC.IsNull()) {
Handle(Geom2d_Line) L = Handle(Geom2d_Line)::DownCast(PC);
L->SetLin2d(gp_Lin2d(origin,vdir));
-#ifdef OCCT_DEBUG
-#ifdef DRAW
- Standard_Boolean trc = TopOpeBRepDS_GettraceBUTO();
- if (trc) {
- FUN_draw(gp_Pnt2d(uinf,vinf));
- FUN_draw(gp_Pnt2d(usup,vsup));
- FUN_draw(L,p3dl-p3df);
- }
-#endif
-#endif
} // (!PC.IsNull())
return Standard_True;
const Standard_Boolean comppc2,
const Standard_Boolean compc3d) const
{
-#ifdef OCCT_DEBUG
-// Standard_Boolean tDSNC = TopOpeBRepDS_GettraceDSNC();
- Standard_Boolean tBUTO = TopOpeBRepDS_GettraceBUTO();
- Standard_Boolean tTRPE = TopOpeBRepDS_GettraceTRPE();
-#endif
-
const TopoDS_Face& F1 = TopoDS::Face(newC.Shape1());
const TopoDS_Face& F2 = TopoDS::Face(newC.Shape2());
const Handle(Geom_Curve)& C3D = C.Curve();
-#ifdef OCCT_DEBUG
-// const Handle(Geom2d_Curve)& PC1 = C.Curve1();
-// const Handle(Geom2d_Curve)& PC2 = C.Curve2();
-#endif
// get bounding vertices Vmin,Vmax supported by the new edge <E>
// and their corresponding parameters parmin,parmax .
TopoDS_Vertex Vmin,Vmax;Standard_Real parmin,parmax;
GetOrientedEdgeVertices(E,Vmin,Vmax,parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO) cout<<"Recompute2 min,max = "<<parmin<<","<<parmax<<endl;
- if (tBUTO) DUMPCURVES(C3D,C);
-#endif
-
Handle(Geom2d_Curve) PC1new;
Handle(Geom2d_Curve) PC2new;
ElCLib::AdjustPeriodic(f,f+period,Precision::PConfusion(),parmin,parmax);
if (compc3d) C3Dnew = new Geom_TrimmedCurve(C3D,parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO||tTRPE) cout<<"Recompute2 : parmin,parmax "<<f<<","<<l<<endl;
- if (tBUTO||tTRPE) cout<<" --> parmin,parmax "<<parmin<<","<<parmax<<endl;
-#endif
}
Standard_Real tolreached3d = C.Tolerance();
}
if (!PC1new.IsNull()) newC.Curve1(PC1new);
if (!PC2new.IsNull()) newC.Curve2(PC2new);
-
-#ifdef OCCT_DEBUG
- if (tBUTO) DUMPCURVES(C3Dnew,newC);
-#endif
}
//=======================================================================
if ( oV == TopAbs_REVERSED ) {
if ( p < f ) {
Standard_Real pp = ElCLib::InPeriod(p,f,f+per);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO() ) {
- cout<<"BuildTool Parameter : "<<p<<" --> "<<pp<<endl;
- }
-#endif
p = pp;
}
}
if ( l2n <= f2n ) {
ElCLib::AdjustPeriodic(f1,l1,Precision::PConfusion(),f2n,l2n);
Range(Eou,f2n,l2n);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO() || TopOpeBRepDS_GettraceTRPE()) {
- cout<<endl;
- cout<<"UpdateEdge f1,l1 "<<f1<<" "<<l1<<endl;
- cout<<"UpdateEdge f2,l2 "<<f2<<" "<<l2<<" "<<endl;
- cout<<"UpdateEdge f2n,l2n "<<f2n<<" "<<l2n<<endl;
- TopExp_Explorer ex;
- for (ex.Init(Eou,TopAbs_VERTEX); ex.More(); ex.Next()) {
- TopoDS_Vertex v = TopoDS::Vertex(ex.Current());
- Standard_Real par = BRep_Tool::Parameter(v,TopoDS::Edge(Eou));
- TopAbs_Orientation o = v.Orientation();
- cout<<"BuildTool vertex ";TopAbs::Print(o,cout); cout<<" "<<par<<endl;
- }
- }
-#endif
}
}
}
du = u2 - u1, dv = v2 - v1;
if ( du != 0. || dv != 0.) {
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceBUTO() || TopOpeBRepDS_GettraceTRPE()) {
- cout<<endl;
- cout<<"TranslateOnPeriodic : Curve range "<<C3Df<<" "<<C3Dl<<endl;
- Standard_Real PCf,PCl;
- BRep_Tool::Range(TopoDS::Edge(E),TopoDS::Face(F),PCf,PCl);
- cout<<"TranslateOnPeriodic : PCurve range "<<PCf<<" "<<PCl<<endl;
- cout<<"TranslateOnPeriodic : translation "<<du<<" "<<dv<<endl;
- }
-#endif
// translate curve PC of du,dv
Handle(Geom2d_Curve) PCT = Handle(Geom2d_Curve)::DownCast(PC->Copy());
PCT->Translate(gp_Vec2d(du,dv));
}
}
-#ifdef OCCT_DEBUG
-//------------------------------------------------------------------------
-static void DUMPPCURVE(const TopoDS_Edge& EE,
- const TopoDS_Face& FF,
- const Handle(Geom2d_Curve)& PC)
-//------------------------------------------------------------------------
-{
- TopLoc_Location L; Standard_Real Cf,Cl;
- Handle(Geom_Curve) C = BRep_Tool::Curve(EE,L,Cf,Cl);
- if (C->IsPeriodic()) {
- cout<<endl;
- cout<<"DUMPPCURVE : ";cout<<" face "; ::PrintSurface(FF,cout); cout<<endl;
- cout<<"PCurve type : ";TopOpeBRepDS_Dumper::PrintType(PC,cout); cout<<endl;
- gp_Pnt oC;
- if (::GetOrigin(C,oC))
- cout<<"(E)Curve origin : "<<oC.X()<<" "<<oC.Y()<<" "<<oC.Z()<<endl;
- cout<<"(E)Curve range : Cf,Cl = "<<Cf<<" "<<Cl<<endl;
-
- Standard_Real PCf,PCl;
- PCf = PC->FirstParameter(); PCl = PC->LastParameter();
- gp_Pnt2d oPC;
- if (::GetOrigin(PC,oPC))
- cout<<"(PC)PCurve origin : "<<oPC.X()<<" "<<oPC.Y()<<endl;
- cout<<"(PC)PCurve range : PCf,PCl = "<<PCf<<" "<<PCl<<endl;
- }
-}
-#endif
-
//=======================================================================
//function : PCurve
//purpose :
TopoDS_Edge EE = TopoDS::Edge(E);
Handle(Geom2d_Curve) PCT = PC;
-#ifdef OCCT_DEBUG
-#ifdef DRAW
- Standard_Boolean trc = Standard_False;
- if (trc) FUN_draw(FF);
- if (trc) FUN_draw(EE);
- if (trc) FUN_draw(PC,0.);
-#endif
- if (TopOpeBRepDS_GettraceTRPE()) DUMPPCURVE(EE,FF,PCT);
-#endif
-
// pour iab, ajout de Translate
Standard_Boolean tran = myTranslate;
-#ifdef OCCT_DEBUG
- if ( TopOpeBRepDS_GettraceSANTRAN()) {
- tran = Standard_False;
- cout<<"SANS translation de pcurve"<<endl;
- }
-#endif
// xpu : 13-06-97 :
// recompute twice the pcurve boundaries if OverWrite
Standard_Real newpar = BRep_Tool::Parameter(vi,EE);
myBuilder.UpdateVertex(vi,newpar,EE,FF,tolvi);
} // INTERNAL vertex
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceTRPE()) DUMPPCURVE(EE,FF,PCT);
-#endif
}
}
TopLoc_Location L; Standard_Real Cf,Cl;
Handle(Geom_Curve) C = BRep_Tool::Curve(EE,L,Cf,Cl);
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceTRPE()) DUMPPCURVE(EE,FF,PCT);
-#endif
if (!C.IsNull()){
Standard_Boolean deca = (Abs(Cf - CDSmin) > Precision::PConfusion());
}
TopOpeBRepDS_SetThePCurve(myBuilder,EE,FF,E.Orientation(),PCT);
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceTRPE()) DUMPPCURVE(EE,FF,PCT);
-#endif
}
}
TopoDS_Shape& EE,
TopOpeBRepDS_Curve& C2) const
{
-#ifdef OCCT_DEBUG
- Standard_Boolean tDSNC = TopOpeBRepDS_GettraceDSNC();
- Standard_Boolean tBUTO = TopOpeBRepDS_GettraceBUTO();
-#endif
-
// C1 curves have been approximated by BSplines of degree 1 :
// compute new geometry on curves.
TopoDS_Vertex Vmin,Vmax; Standard_Real parmin,parmax;
::GetOrientedEdgeVertices(E,Vmin,Vmax,parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO) cout<<"Recompute1 min,max = "<<parmin<<","<<parmax<<endl;
- if (tBUTO) DUMPCURVES(C3D,C1);
-#endif
-
+
Handle(Geom_Curve) C3Dnew;
Handle(Geom2d_Curve) PC1new;
Handle(Geom2d_Curve) PC2new;
TopoDS_Shape& EE,
TopOpeBRepDS_Curve& C2 ) const
{
-#ifdef OCCT_DEBUG
- Standard_Boolean tDSNC = TopOpeBRepDS_GettraceDSNC();
- Standard_Boolean tBUTO = TopOpeBRepDS_GettraceBUTO();
- Standard_Boolean tTRPE = TopOpeBRepDS_GettraceTRPE();
-#endif
-
// C1 Pcurves have not been computed because C1 Curve is not projectable
// on one at least of the intersecting faces giving C1 Curve.
// (see TopOpeBRepTool_CurveTool::IsProjectable())
TopoDS_Vertex Vmin,Vmax; Standard_Real parmin,parmax;
::GetOrientedEdgeVertices(E,Vmin,Vmax,parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO) {cout<<"Recompute2 min,max = "<<parmin<<","<<parmax<<endl;
- DUMPCURVES(C3D,C1);}
-#endif
-
if ( C3D->IsPeriodic() ) {
// ellipse on cone : periodize parmin,parmax
Standard_Real period = C3D->LastParameter() - C3D->FirstParameter();
else { f = parmax; l = parmin; }
parmin = f; parmax = l;
ElCLib::AdjustPeriodic(f,f+period,Precision::PConfusion(),parmin,parmax);
-#ifdef OCCT_DEBUG
- if (tBUTO||tTRPE) cout<<"Recompute2 : parmin,parmax "<<f<<","<<l<<endl;
- if (tBUTO||tTRPE) cout<<" --> parmin,parmax "<<parmin<<","<<parmax<<endl;
-#endif
}
Handle(Geom_TrimmedCurve) C3Dnew;
// Standard_Real isrev1 =
// ::FUN_reversePC(PC1new,F1,P3DC3D,par2d,tol);
//
-//#ifdef OCCT_DEBUG
-// if (tBUTO && isrev1) cout<<"on retourne PC1"<<endl;
-//#endif
//
// }
//
// Standard_Real isrev2 =
// ::FUN_reversePC(PC2new,F2,P3DC3D,par2d,tol);
//
-//#ifdef OCCT_DEBUG
-// if (tBUTO && isrev2) cout<<"on retourne PC2"<<endl;
-//#endif
// }
// xpu : 17-06-97
if (!C3Dnew.IsNull()) C2.Curve(C3Dnew,newtol);
if (!PC1new.IsNull()) C2.Curve1(PC1new);
if (!PC2new.IsNull()) C2.Curve2(PC2new);
-
-#ifdef OCCT_DEBUG
- if (tBUTO) DUMPCURVES(C3Dnew,C2);
-#endif
}*/ // - merge 04-07-97
const TopOpeBRepDS_ListOfInterference& LI = DS.PointInterferences(i);
bI = bI && ChkIntgInterf(LI);
}
-
-#ifdef OCCT_DEBUG
- PrintIntg(cout);
-#endif
-// CheckEdgeParameter();
+
+ // CheckEdgeParameter();
CheckEdgeParameter(myHDS);
return bI;
case TopOpeBRepDS_SURFACE :
{
if(myHDS->NbSurfaces() < I) {
-#ifdef OCCT_DEBUG
- cout<<"Surpassed index of TopOpeBRepDS_SURFACE. actual index : "<<I;
- cout<<". Index max : "<<myHDS->NbSurfaces();
-#endif
if(myMapSurfaceStatus.IsBound(I))
myMapSurfaceStatus.UnBind(I);
myMapSurfaceStatus.Bind(I, TopOpeBRepDS_NOK);
case TopOpeBRepDS_CURVE :
{
if(myHDS->NbCurves() < I) {
-#ifdef OCCT_DEBUG
- cout<<"Surpassed index of TopOpeBRepDS_CURVE. actual index : "<<I;
- cout<<". Index max : "<<myHDS->NbCurves();
-#endif
if(myMapCurveStatus.IsBound(I))
myMapCurveStatus.UnBind(I);
myMapCurveStatus.Bind(I, TopOpeBRepDS_NOK);
case TopOpeBRepDS_POINT :
{
if(myHDS->NbPoints() < I) {
-#ifdef OCCT_DEBUG
- cout<<"Surpassed index of TopOpeBRepDS_POINT : actual index : "<<I;
- cout<<". Index max : "<<myHDS->NbPoints()<<endl;
-#endif
if(myMapPointStatus.IsBound(I))
myMapPointStatus.UnBind(I);
myMapPointStatus.Bind(I, TopOpeBRepDS_NOK);
// topology
if(myHDS->NbShapes() < I) {
-#ifdef OCCT_DEBUG
- cout<<"Surpassed index of TopOpeBRepDS_Shape_. actual index : "<<I;
- cout<<". Index max : "<<myHDS->NbShapes();
-#endif
if(myMapShapeStatus.IsBound(I))
myMapShapeStatus.UnBind(I);
myMapShapeStatus.Bind(I,TopOpeBRepDS_NOK);
break ;
}
if(S.ShapeType() != se) {
-#ifdef OCCT_DEBUG
- cout<<"Error : Shape "<<I<<" is a ";
- TopOpeBRepDS::Print(TopOpeBRepDS::ShapeToKind(S.ShapeType()), cout);
- cout<<" and not a ";
- TopOpeBRepDS::Print(K, cout);
- cout<<endl;
-#endif
if(myMapShapeStatus.IsBound(I))
myMapShapeStatus.UnBind(I);
myMapShapeStatus.Bind(I,TopOpeBRepDS_NOK);
const TopoDS_Shape& Sind = myHDS->Shape(i);
const TopTools_ListOfShape& losi = BDS.ShapeSameDomain(Sind);
if(!CheckShapes(losi)) {
-#ifdef OCCT_DEBUG
- cout<<"Shape of ShapeSameDomain (n*n "<<i;
- cout<<") is not defined in the DS"<<endl;
-#endif
b = Standard_False;
}
Curr = BDS.SameDomainRef(i);
Loc = BDS.SameDomainRef(Curr);
if(Curr && (Curr != Loc)) {
-#ifdef OCCT_DEBUG
- cout<<"SameDomaineRef of Shape "<<i<<" = "<<Curr;
- cout<<". SameDomaineRef of Shape "<<Curr<<" = "<<Loc<<endl;
-#endif
b = Standard_False;
}
// Verification du type des differents Shapes SameDomain
const TopoDS_Shape& Sref = myHDS->Shape(Curr);
if(Sind.ShapeType() != Sref.ShapeType()) {
-#ifdef OCCT_DEBUG
- cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain."<<endl;
- cout<<"Type of Shape n*n "<<i<<" = ";
- PrintShape(Sind.ShapeType(),cout);
- cout<<endl<<"Type of Shape n*n "<<Curr<<" = ";
- PrintShape(Sref.ShapeType(),cout); cout<<endl;
-#endif
b = Standard_False;
}
liolos.Next();
}
if(!bb) {
-#ifdef OCCT_DEBUG
- cout<<"Shapes n*n "<<i<<" and "<<Curr<<" are SameDomain. ";
- cout<<"The reference of "<<i<<", is "<<Curr<<"."<<endl;
- cout<<"However, Shape n*n "<<i;
- cout<<" is not in the list of Shape SameDomain of "<<Curr<<endl;
-#endif
b = Standard_False;
}
}
Dist = P1.Distance(P2);
if(Dist <= tol1 + tol2) {
if(sdr1 != sdr2) {
-#ifdef OCCT_DEBUG
- 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;
- cout<<" Tol of Vertex n*n"<<Curr2<<" = "<<tol2<<endl;
- cout<<" Distance between two Vertexes = "<<Dist<<endl<<endl;
-#endif
b = Standard_False;
}
}
else if(sdr1 == sdr2) {
-#ifdef OCCT_DEBUG
- cout<<"Pb Vertex "<<Curr1<<" and "<<Curr2;
- cout<<" : SameDomain, not same place"<<endl;
- cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
- cout<<" Tol of Vertex n*n"<<Curr2<<" = "<<tol2<<endl;
- cout<<" Distance between two Vertexes = "<<Dist<<endl<<endl;
-#endif
b = Standard_False;
}
}
const gp_Pnt& Pnt2 = TopOpeBRepTool_ShapeTool::Pnt(S1);
Dist = Pnt1.Distance(Pnt2);
if(Dist <= tol1 + tol2) {
-#ifdef OCCT_DEBUG
- cout<<"Attention : Vertex "<<Curr1<<" and Point "<<PE.Index();
- cout<<" are confused"<<endl;
- cout<<" Tol of Vertex n*n"<<Curr1<<" = "<<tol1<<endl;
- cout<<" Tol of Point n*n"<<PE.Index()<<" = "<<tol2<<endl;
- cout<<" Distance between the two = "<<Dist<<endl<<endl;
-#endif
b = Standard_False;
}
}
for(j = i+1;j < NbPo;j++) {
const TopOpeBRepDS_Point& dsPnt2 = myHDS->Point(j);
if(dsPnt1.IsEqual(dsPnt2)) {
-#ifdef OCCT_DEBUG
- 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;
- Dist = dsPnt1.Point().Distance(dsPnt2.Point());
- cout<<" Distance between the two = "<<Dist<<endl<<endl;
-#endif
}
}
}
Handle(TopOpeBRepDS_EdgeVertexInterference) EVI =
Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I1);
if(!EVI.IsNull()) {
-//#ifdef OCCT_DEBUG
-// Standard_Integer Param = EVI->Parameter();
-//#else
Standard_Integer Param = (Standard_Integer ) EVI->Parameter();
-//#endif
if(Param > 1.e50) {
- I1->Dump(cout,"!!**!!** WARNING : sur l'interference : \n",
- "parameter > 1.e50");
IsOK = Standard_False;
}
}
Handle(TopOpeBRepDS_CurvePointInterference) CPI (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I1));
if(!CPI.IsNull()) {
Standard_Integer Param =
-//#ifdef OCCT_DEBUG
-// TopOpeBRepDS_InterferenceTool::Parameter(CPI);
-//#else
(Standard_Integer ) TopOpeBRepDS_InterferenceTool::Parameter(CPI);
-//#endif
if(Param > 1.e50) {
- I1->Dump(cout,"!!**!!** WARNING : sur l'interference : \n",
- "parameter > 1.e50");
IsOK = Standard_False;
}
}
return OS;
}
OS<<" ";
-#ifdef OCCT_DEBUG
- const TopoDS_Shape& S =
-#endif
- myHDS->Shape(index);
-
-#ifdef OCCT_DEBUG
- PrintShape(S.ShapeType(),cout);
- OS<<" "<<index<<" = ";
- Print(myMapShapeStatus.Find(index), cout);
-#endif
+ myHDS->Shape(index);
+
return OS;
}
myIsWalk = B;
}
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-#ifdef OCCT_DEBUG
-Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
- const Standard_Integer index,
- const Standard_Boolean compact)const
-{
- OS<<"Curve : "; if (index != 0) OS<<index<<" ";
- if (!Curve().IsNull()) {
- TopOpeBRepDS_Dumper::Print(Curve(),OS,compact);
- Standard_Real f,l;
- if (Range(f,l)) OS<<"has range of "<<f<<","<<l<<endl;
- else OS<<"has no range defined"<<endl;
- }
- else OS<<" is null";
- OS<<endl;
-
-#define DSCI(tut) (*((Handle(TopOpeBRepDS_SurfaceCurveInterference)*)&(tut)))
-
- Handle(TopOpeBRepDS_Interference) I1,I2;
- GetSCI(I1,I2);
-
- OS<<"SCI1 : ";
- if (!I1.IsNull()) DSCI(I1)->DumpPCurve(OS,compact);
- else OS<<" is null";
- OS<<endl;
-
- OS<<"SCI2 : ";
- if (!I2.IsNull()) DSCI(I2)->DumpPCurve(OS,compact);
- else OS<<" is null";
- OS<<endl;
-
- return OS;
-}
-#else
-Standard_OStream& TopOpeBRepDS_Curve::Dump (Standard_OStream& OS,
- const Standard_Integer,
- const Standard_Boolean)const
-{
- return OS;
-}
-#endif
-
-
//=======================================================================
//function : Keep
//purpose :
Standard_EXPORT Standard_Integer DSIndex() const;
Standard_EXPORT void ChangeDSIndex (const Standard_Integer I);
-
- Standard_EXPORT Standard_OStream& Dump (Standard_OStream& OS, const Standard_Integer index, const Standard_Boolean compact = Standard_True) const;
{
myParam = P;
}
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_CurvePointInterference::Dump
- (Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_Kind supporttype = SupportType();
- if (supporttype == TopOpeBRepDS_EDGE) OS<<"EPI";
- else if (supporttype == TopOpeBRepDS_CURVE) OS<<"CPI";
- else if (supporttype == TopOpeBRepDS_FACE) OS<<"ECPI";
- else OS<<"???";
- OS<<" "; TopOpeBRepDS_Interference::Dump(OS);
- OS<<" "<<myParam;
-#endif
-
- return OS;
-}
Standard_EXPORT void Parameter (const Standard_Real P);
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
-
-
-
DEFINE_STANDARD_RTTIEXT(TopOpeBRepDS_CurvePointInterference,TopOpeBRepDS_Interference)
+++ /dev/null
-// Created on: 1998-06-22
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _TopOpeBRepDS_tsx_HeaderFile
-#define _TopOpeBRepDS_tsx_HeaderFile
-
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_define.hxx>
-
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX(const Standard_Boolean b,Standard_Integer n,char** a);
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer i);
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSX(const TopoDS_Shape& S);
-Standard_EXPORT Standard_Integer TopOpeBRepDS_GetindexSPSX(const TopoDS_Shape& S);
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX(const Standard_Integer i,const Standard_Boolean b);
-
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSXX(const Standard_Boolean b, Standard_Integer n, char** a);
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSXX(const Standard_Integer i1,const Standard_Integer i2);
-
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_SS(const TopoDS_Shape&,const TopoDS_Shape&);
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_HDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_SSHDS(const TopoDS_Shape&,const TopoDS_Shape&, const Handle(TopOpeBRepDS_HDataStructure)& HDS);
-#endif
-
-#endif
#include <TopOpeBRepTool_ShapeTool.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
-//modified by NIZNHY-PKV Tue Oct 30 09:21:39 2001 f
-//modified by NIZNHY-PKV Tue Oct 30 09:21:44 2001 t
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-#include <TCollection_AsciiString.hxx>
-#include <TopOpeBRepDS.hxx>
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_DataStructure
//purpose :
//=======================================================================
void TopOpeBRepDS_DataStructure::RemoveSurface(const Standard_Integer I)
{
-#ifdef OCCT_DEBUG
-// Standard_Boolean in =
-#endif
- mySurfaces.UnBind(I);
+ mySurfaces.UnBind(I);
}
//=======================================================================
TopOpeBRepDS_CurveData CD(C);
myCurves.Bind(myNbCurves,CD);
-#ifdef OCCT_DEBUG
- // const TopOpeBRepDS_Curve& CCC = Curve(myNbCurves);
-#endif
-
return myNbCurves;
}
TopOpeBRepDS_ShapeData SD;
iS = myShapes.Add(S,SD);
// a shape is its own reference, oriented as itself
-#ifdef OCCT_DEBUG
- Standard_Boolean b = TopOpeBRepDS_GettraceSPSX(iS);
- if (b) {cout<<"DS : add ";TopOpeBRepDS::Print(S.ShapeType(),iS,cout);cout<<endl;}
-#endif
SameDomainRef(iS,iS);
SameDomainOri(iS,TopOpeBRepDS_SAMEORIENTED);
}
TopOpeBRepDS_ShapeData SD;
iS = myShapes.Add(S,SD);
// a shape is its own reference, oriented as itself
-#ifdef OCCT_DEBUG
- Standard_Boolean b = TopOpeBRepDS_GettraceSPSX(iS);
- if (b) {
- cout<<"DS : add ";TopOpeBRepDS::Print(S.ShapeType(),iS,cout);
- cout<<"("<<Ianc<<")";
- cout<<endl;
- }
-#endif
SameDomainRef(iS,iS);
SameDomainOri(iS,TopOpeBRepDS_SAMEORIENTED);
AncestorRank(iS,Ianc);
//=======================================================================
void TopOpeBRepDS_DataStructure::AddShapeSameDomain(const TopoDS_Shape& S, const TopoDS_Shape& SSD)
{
-#ifdef OCCT_DEBUG
-// TopAbs_ShapeEnum t = SSD.ShapeType();
-#endif
Standard_Boolean append = Standard_True;
{
TopTools_ListIteratorOfListOfShape it(ShapeSameDomain(S));
//=======================================================================
void TopOpeBRepDS_DataStructure::RemoveShapeSameDomain(const TopoDS_Shape& S, const TopoDS_Shape& SSD)
{
-#ifdef OCCT_DEBUG
-// TopAbs_ShapeEnum t = SSD.ShapeType();
-#endif
TopTools_ListOfShape& L = ChangeShapeSameDomain(S);
TopTools_ListIteratorOfListOfShape it(L);
while (it.More()) {
else if ( r1 != iS1 && r2 != iS2 ) {
if (r1 != r2) {
// Standard_ProgramError::Raise("FacesFiller::Insert SD 1");
-#ifdef OCCT_DEBUG
- cout<<"FacesFiller::Insert SD 1"<<endl;
-#endif
}
r = (refFirst? r1 : r2);
}
//=======================================================================
void TopOpeBRepDS_DataStructure::UnfillShapesSameDomain(const TopoDS_Shape& S1,const TopoDS_Shape& S2)
{
-#ifdef OCCT_DEBUG
-// Standard_Integer iS1 = Shape(S1);
-// Standard_Integer iS2 = Shape(S2);
-// Standard_Integer n1 = ShapeSameDomain(S1).Extent();
-// Standard_Integer n2 = ShapeSameDomain(S2).Extent();
-#endif
-
RemoveShapeSameDomain(S1,S2);
RemoveShapeSameDomain(S2,S1);
-
-#ifdef OCCT_DEBUG
-// Standard_Integer n11 = ShapeSameDomain(S1).Extent();
-// Standard_Integer n22 = ShapeSameDomain(S2).Extent();
-#endif
}
//=======================================================================
const TopOpeBRepDS_Point& TopOpeBRepDS_DataStructure::Point(const Standard_Integer I)const
{
if ( I < 1 || I > myNbPoints ) {
-#ifdef OCCT_DEBUG
- 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 OCCT_DEBUG
- cout<<"acces au POINT "<<I<<" incorrect "<<myNbPoints<<" max"<<endl;
-#endif
Standard_ProgramError::Raise("TopOpeBRepDS_DataStructure::Point");
}
myHDS = HDS;
}
-//=======================================================================
-//function : PrintType
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::PrintType(const Handle(Geom_Curve)&
-#ifdef OCCT_DEBUG
- C
-#endif
- ,Standard_OStream& OS)
-{
-#ifdef OCCT_DEBUG
- if (C.IsNull()) {
- OS<<"NULL CURVE";
- return OS;
- }
- Handle(Standard_Type) T = C->DynamicType();
- if (T==STANDARD_TYPE(Geom_Circle)) OS<<"CIRCLE";
- else if (T==STANDARD_TYPE(Geom_Line)) OS<<"LINE";
- else if (T==STANDARD_TYPE(Geom_Ellipse)) OS<<"ELLIPSE";
- else if (T==STANDARD_TYPE(Geom_Parabola)) OS<<"ELLIPSE";
- else if (T==STANDARD_TYPE(Geom_Hyperbola)) OS<<"HYPERBOLA";
- else if (T==STANDARD_TYPE(Geom_BezierCurve)) OS<<"BEZIER";
- else if (T==STANDARD_TYPE(Geom_BSplineCurve))
- OS<<"BSPLINE("<<Handle(Geom_BSplineCurve)::DownCast (C)->Degree()<<")";
- else if (T==STANDARD_TYPE(Geom_TrimmedCurve))
- {OS<<"TRIMMED ";PrintType(Handle(Geom_TrimmedCurve)::DownCast(C)->BasisCurve(),OS);}
- else if (T==STANDARD_TYPE(Geom_OffsetCurve)) OS<<"OFFSETCURVE";
- else OS<<"***UNKNOWN***";
- if (T!=STANDARD_TYPE(Geom_TrimmedCurve)) OS<<"3D";
-#endif
-
- return OS;
-}
-
-//=======================================================================
-//function : PrintType
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::PrintType(const Handle(Geom2d_Curve)&
-#ifdef OCCT_DEBUG
- C
-#endif
- ,Standard_OStream& OS)
-{
-#ifdef OCCT_DEBUG
- if (C.IsNull()) {
- OS<<"NULL CURVE2d";
- return OS;
- }
- Handle(Standard_Type) T = C->DynamicType();
- if (T==STANDARD_TYPE(Geom2d_Circle)) OS<<"CIRCLE";
- else if (T==STANDARD_TYPE(Geom2d_Line)) OS<<"LINE";
- else if (T==STANDARD_TYPE(Geom2d_Ellipse)) OS<<"ELLIPSE";
- else if (T==STANDARD_TYPE(Geom2d_Parabola)) OS<<"ELLIPSE";
- else if (T==STANDARD_TYPE(Geom2d_Hyperbola)) OS<<"HYPERBOLA";
- else if (T==STANDARD_TYPE(Geom2d_BezierCurve)) OS<<"BEZIER";
- else if (T==STANDARD_TYPE(Geom2d_BSplineCurve))
- OS<<"BSPLINE("<<Handle(Geom2d_BSplineCurve)::DownCast (C)->Degree()<<")";
- else if (T==STANDARD_TYPE(Geom2d_TrimmedCurve))
- {OS<<"TRIMMED ";PrintType(Handle(Geom2d_TrimmedCurve)::DownCast(C)->BasisCurve(),OS);}
- else if (T==STANDARD_TYPE(Geom2d_OffsetCurve)) OS<<"OFFSETCURVE";
- else OS<<"***UNKNOWN***";
- if (T!=STANDARD_TYPE(Geom2d_TrimmedCurve)) OS<<"2D";
-#endif
-
- return OS;
-}
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const gp_Pnt&
-#ifdef OCCT_DEBUG
- P
-#endif
- ,Standard_OStream& OS)
-{
-#ifdef OCCT_DEBUG
- OS<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<" ";
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const gp_Pnt2d&
-#ifdef OCCT_DEBUG
- P
-#endif
- ,Standard_OStream& OS)
-{
-#ifdef OCCT_DEBUG
- OS<<P.X()<<" "<<P.Y()<<" ";
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom_BSplineCurve)&
-#ifdef OCCT_DEBUG
- B
-#endif
- ,Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- )
-{
-#ifdef OCCT_DEBUG
- Standard_Integer i,l,lb = 0,n;
-
- Standard_Integer degree = B->Degree();
- Standard_Integer nbpoles = B->NbPoles();
- Standard_Integer nbknots = B->NbKnots();
- Standard_Boolean rational = B->IsRational();
- Standard_Boolean periodic = B->IsPeriodic();
-
- OS<<"BSplineCurve : ";
- if (periodic) OS<<"periodic, ";
- OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
-
- //l = strlen("poles : ") + 1
- for (i = 1,OS<<"poles : ",l = 9,n = nbpoles;
- i<=n;
- i++) {
- if (!compact) { if (i == 1) lb = 0; else lb = l; }
- else if (i == 1) lb = 0;
- else if (i == 2) lb = l;
- else if (i == n-1) {
- lb = l;
- if(n > 4) OS << setw(lb) << "\t ...\n";
- }
- else if (i == n) lb = l;
- else continue;
-
- OS<<setw(lb)<<i<<" : ";
- TopOpeBRepDS_Dumper::Print(B->Pole(i),OS);
- if (rational) OS<<" "<<B->Weight(i);
-
- OS<<endl;
- }
-
- //l = strlen("knots : ") + 1
- for (i = 1,OS<<"knots : ",l = 9,n = nbknots;
- i<=n;
- i++) {
- if (!compact) { if (i == 1) lb = 0; else lb = l; }
- else if (i == 1) lb = 0;
- else if (i == 2) lb = l;
- else if (i == n-1) {
- if(n > 4) OS << setw(lb) << "\t ...\n";
- lb = l;
- }
- else if (i == n) lb = l;
- else continue;
-
- OS<<setw(lb)<<i<<" : ";
- OS<<B->Knot(i)<<" "<<B->Multiplicity(i);
-
- OS<<endl;
- }
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom2d_BSplineCurve)&
-#ifdef OCCT_DEBUG
- B
-#endif
- ,Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- )
-{
-#ifdef OCCT_DEBUG
- Standard_Integer i,l,lb=-1,n;
-
- Standard_Integer degree = B->Degree();
- Standard_Integer nbpoles = B->NbPoles();
- Standard_Integer nbknots = B->NbKnots();
- Standard_Boolean rational = B->IsRational();
- Standard_Boolean periodic = B->IsPeriodic();
-
- OS<<"BSplineCurve : ";
- if (periodic) OS<<"periodic, ";
- OS<<"degree "<<degree<<", "<<nbpoles<<" poles, "<<nbknots<<" knots"<<endl;
-
- //l = strlen("poles : ") + 1
- for (i = 1,OS<<"poles : ",l = 9,n = nbpoles;
- i<=n;
- i++) {
- if (!compact) { if (i == 1) lb = 0; else lb = l; }
- else if (i == 1) lb = 0;
- else if (i == 2) lb = l;
- else if (i == n-1) {
- lb = l;
- if(n > 4) OS << setw(lb) << "\t ...\n";
- }
- else if (i == n) lb = l;
- else continue;
-
- OS<<setw(lb)<<i<<" : ";
- TopOpeBRepDS_Dumper::Print(B->Pole(i),OS);
- if (rational) OS<<" "<<B->Weight(i);
-
- OS<<endl;
- }
-
- //l = strlen("knots : ") + 1
- for (i = 1,OS<<"knots : ",l = 9,n = nbknots;
- i<=n;
- i++) {
- if (!compact) { if (i == 1) lb = 0; else lb = l; }
- else if (i == 1) lb = 0;
- else if (i == 2) lb = l;
- else if (i == n-1) {
- lb = l;
- if(n > 4) OS << setw(lb) << "\t ...\n";
- }
- else if (i == n) lb = l;
- else continue;
-
- OS<<setw(lb)<<i<<" : ";
- OS<<B->Knot(i)<<" "<<B->Multiplicity(i);
-
- OS<<endl;
- }
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom_Curve)&
-#ifdef OCCT_DEBUG
- C
-#endif
- ,Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- )
-{
-#ifdef OCCT_DEBUG
-#define DBSP3D(tut) (*((Handle(Geom_BSplineCurve)*)&(tut)))
- if (!C.IsNull()) {
- if (C->DynamicType() == STANDARD_TYPE(Geom_BSplineCurve))
- TopOpeBRepDS_Dumper::Print(DBSP3D(C),OS,compact);
- else
- GeomTools_CurveSet::PrintCurve(C,OS,Standard_False);
- }
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Print
-//purpose :
-//=======================================================================
-
-#ifdef OCCT_DEBUG
-Standard_OStream& TopOpeBRepDS_Dumper::Print(const Handle(Geom2d_Curve)& C,
- Standard_OStream& OS,const Standard_Boolean compact)
-{
-#define DBSP2D(tut) (*((Handle(Geom2d_BSplineCurve)*)&(tut)))
- if (!C.IsNull()) {
- if (C->DynamicType() == STANDARD_TYPE(Geom2d_BSplineCurve))
- TopOpeBRepDS_Dumper::Print(DBSP2D(C),OS,compact);
- else
- GeomTools_Curve2dSet::PrintCurve2d(C,OS,Standard_False);
- }
-
- return OS;
-}
-#endif
-
-// DUMP OF HDATASTRUCTURE
-
-//-----------------------------------------------------------------------
-#ifdef OCCT_DEBUG
-//unreferenced function, commented
-/*static void souligne(const TCollection_AsciiString& t,Standard_OStream& OS,const char c = '-')
-{ for(char i=0;i<t.Length();i++)OS<<c; }*/
-//-----------------------------------------------------------------------
-// print the name of a Kind on a AsciiString.
-static TCollection_AsciiString& Print(const TopOpeBRepDS_Kind k,TCollection_AsciiString& s)
-{
- switch(k) {
- case TopOpeBRepDS_SURFACE : s.AssignCat("SURFACE");break;
- case TopOpeBRepDS_CURVE : s.AssignCat("CURVE");break;
- case TopOpeBRepDS_POINT : s.AssignCat("POINT");break;
- case TopOpeBRepDS_SOLID : s.AssignCat("SOLID");break;
- case TopOpeBRepDS_SHELL : s.AssignCat("SHELL");break;
- case TopOpeBRepDS_FACE : s.AssignCat("FACE");break;
- case TopOpeBRepDS_WIRE : s.AssignCat("WIRE");break;
- case TopOpeBRepDS_EDGE : s.AssignCat("EDGE");break;
- case TopOpeBRepDS_VERTEX : s.AssignCat("VERTEX");break;
- default:
- break ;
- }
- return s;
-}
-#endif
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::Dump(Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- findkeep
-#endif
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- OS<<endl<<"==== HDS start filling resume"<<endl;
- DumpGeometry(OS,findkeep,compact);
- DumpTopology(OS);
- OS<<endl<<"==== HDS end filling resume"<<endl;
-#endif
- return OS;
-}
-
-
-//=======================================================================
-//function : DumpGeometry
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpGeometry(Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- findkeep
-#endif
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- DumpGeometry(TopOpeBRepDS_POINT,OS,findkeep,compact);
- DumpGeometry(TopOpeBRepDS_CURVE,OS,findkeep,compact);
- DumpGeometry(TopOpeBRepDS_SURFACE,OS,findkeep,compact);
-#endif
- return OS;
-}
-
-
-//=======================================================================
-//function : DumpGeometry
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpGeometry
- (const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,Standard_OStream& OS
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- findkeep
-#endif
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- if ( ! TopOpeBRepDS::IsGeometry(K) ) return OS;
- Standard_Integer nt = myHDS->NbGeometry(K);
- if (!nt) return OS;
-
- Standard_Integer n=0;
- if (K==TopOpeBRepDS_POINT){TopOpeBRepDS_PointExplorer ex(myHDS->DS(),findkeep);n=ex.NbPoint();}
- else if(K==TopOpeBRepDS_CURVE){TopOpeBRepDS_CurveExplorer ex(myHDS->DS());n=ex.NbCurve();}
- else if(K==TopOpeBRepDS_SURFACE){TopOpeBRepDS_SurfaceExplorer ex(myHDS->DS());n=ex.NbSurface();}
- if (!n) return OS;
- TCollection_AsciiString s = "---- "; ::Print(K,s);
- OS<<endl<<s<<" : "<<n<<endl;
- for(Standard_Integer i=1;i<=nt;i++) DumpGeometry(K,i,OS,findkeep,compact);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpGeometry
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpGeometry(const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- I
-#endif
- ,Standard_OStream& OS,
- const Standard_Boolean
-#ifdef OCCT_DEBUG
- findkeep
-#endif
- ,const Standard_Boolean
-#ifdef OCCT_DEBUG
- compact
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- if ( ! TopOpeBRepDS::IsGeometry(K) ) return OS;
-
- if ( K == TopOpeBRepDS_POINT ) {
- TopOpeBRepDS_PointExplorer pex(myHDS->DS());
- Standard_Boolean isp = pex.IsPoint(I);
- Standard_Boolean isk = pex.IsPointKeep(I);
- if(!findkeep || isk) {
- TCollection_AsciiString kstr;::Print(K,kstr);kstr=kstr+" "+I+" :";
- Standard_Integer lk = kstr.Length();
- OS<<kstr;
- if (isp) {
- const TopOpeBRepDS_Point& PDS = pex.Point(I);
- OS<<" (K:"<<((isk)?"1":"0") <<")"<<endl;
- OS<<"tol = "<<PDS.Tolerance()<<endl;
- TCollection_AsciiString istr(lk,' ');
- const gp_Pnt& P = PDS.Point();
- OS<<istr; OS<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
- }
- else OS<<"unbounded"<<endl;
- }
- }
- else if ( K == TopOpeBRepDS_CURVE ) {
- TopOpeBRepDS_CurveExplorer cex(myHDS->DS());
- Standard_Boolean isc = cex.IsCurve(I);
- Standard_Boolean isk = cex.IsCurveKeep(I);
- if(!findkeep || isk) {
- TCollection_AsciiString kstr;::Print(K,kstr);kstr=kstr+" "+I+" :";
- Standard_Integer lk = kstr.Length();
- OS<<kstr;
- if (isc) {
- const TopOpeBRepDS_Curve& CDS = cex.Curve(I);
- OS<<" (K:"<<((isk)?"1":"0")<<")";
- OS<<" (M:"<<CDS.Mother()<<")"<<endl;
- TCollection_AsciiString istr(lk+1,' ');
- OS<<istr;PrintType(CDS.Curve(),OS);
- OS<<" tol = "<<CDS.Tolerance()<<endl;
- Standard_Real first,last;
- if(CDS.Range(first,last))
- OS<<istr<<"first = "<<first<<" last = "<<last<<endl;
- TopOpeBRepDS_InterferenceIterator it(myHDS->DS().CurveInterferences(I));
- for (;it.More();it.Next()) it.Value()->Dump(OS,istr,"\n");
- {
- const Handle(TopOpeBRepDS_Interference)& SCI1 = CDS.GetSCI1();
- const Handle(TopOpeBRepDS_Interference)& SCI2 = CDS.GetSCI2();
- Handle(Geom2d_Curve) PC1,PC2;
- if ( !SCI1.IsNull())
- PC1 = Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast(SCI1)->PCurve();
- if ( !SCI2.IsNull())
- PC2 = Handle(TopOpeBRepDS_SurfaceCurveInterference)::DownCast(SCI2)->PCurve();
-
- OS<<istr;OS<<"PC(SCI1) : ";Print(PC1,cout,compact);
- OS<<istr;OS<<"PC(SCI2) : ";Print(PC2,cout,compact);
- OS<<endl;
- }
- }
- else OS<<"unbounded"<<endl;
- }
- }
-
- else if ( K == TopOpeBRepDS_SURFACE ) {
- TopOpeBRepDS_SurfaceExplorer sex(myHDS->DS());
- Standard_Boolean iss = sex.IsSurface(I);
- Standard_Boolean isk = sex.IsSurfaceKeep(I);
- if(!findkeep || isk) {
- TCollection_AsciiString kstr; ::Print(K,kstr); kstr=kstr+" "+I+" : ";
- Standard_Integer lk = kstr.Length();
- OS<<kstr;
- if (iss) {
- const TopOpeBRepDS_Surface& SDS = sex.Surface(I);
- OS<<" (K:"<<((isk)?"1":"0") <<")"<<endl;
- OS<<"tol = "<<SDS.Tolerance()<<endl;
- {
- TCollection_AsciiString istr(lk,' ');
- TopOpeBRepDS_InterferenceIterator it(myHDS->SurfaceCurves(I));
- for (;it.More();it.Next()) {
- OS<<istr; it.Value()->Dump(OS);OS<<endl;
- }
- }
- }
- else OS<<"unbounded"<<endl;
- }
- }
- else {
- return OS;
- }
-
-#endif
- return OS;
-}
-
-// = = = = = = = T O P O L O G Y
-
-//=======================================================================
-//function : DumpTopology
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpTopology(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- DumpTopology(TopOpeBRepDS_VERTEX,OS);
- DumpTopology(TopOpeBRepDS_EDGE,OS);
- DumpTopology(TopOpeBRepDS_WIRE,OS);
- DumpTopology(TopOpeBRepDS_FACE,OS);
- DumpTopology(TopOpeBRepDS_SHELL,OS);
- DumpTopology(TopOpeBRepDS_SOLID,OS);
- DumpSectionEdge(TopOpeBRepDS_EDGE,OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpTopology
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpTopology(const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- if ( ! TopOpeBRepDS::IsTopology(K) ) return OS;
- Standard_Integer nk = myHDS->NbTopology(K);
- if ( ! nk ) return OS;
-
- OS<<endl;
- TCollection_AsciiString s = "---- "; ::Print(K,s);
- Standard_Integer nt = myHDS->NbTopology();
- OS<<s<<" : "<<nk<<"/"<<nt<<" shapes"<<endl;
- for(Standard_Integer i = 1; i <= nt; i++) DumpTopology(K,i,OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpTopology
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpTopology(const TopAbs_ShapeEnum
-#ifdef OCCT_DEBUG
- T
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- DumpTopology(TopOpeBRepDS::ShapeToKind(T),OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpSectionEdge
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpSectionEdge(const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- Standard_Integer nse = myHDS->DS().NbSectionEdges();
- if ( ! nse ) return OS;
-
- OS<<endl;
- TCollection_AsciiString s = "---- ";
- OS<<s<<"Section Edges : "<<nse<<" edges"<<endl;
- for(Standard_Integer i = 1; i <= nse; i++) {
- DumpSectionEdge(K,i,OS);
- }
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpSectionEdge
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpSectionEdge(const TopOpeBRepDS_Kind K,const Standard_Integer I,Standard_OStream& OS) const
-{
- Standard_Boolean SEFindKeep = Standard_False;
- const TopOpeBRepDS_DataStructure& DS = myHDS->DS();
- const TopoDS_Shape& E = DS.SectionEdge(I,SEFindKeep);
- if(E.IsNull()) return OS;
- Standard_Integer it = myHDS->DS().Shape(E,SEFindKeep);
- if (it == 0) {
- // E trouvee "Restriction" par les intersections n'est pas dans la DS.
- OS<<endl<<"EDGE section "<<I<<" non Shape()"<<endl;
- }
- else DumpTopology(K,it,OS);
- return OS;
-}
-
-Standard_EXPORT Standard_Integer TopOpeBRepDS_GLOBALHDSinterfselector = 0; // NYI arg of Dump method
-
-//=======================================================================
-//function : DumpTopology
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpTopology(const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- I
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- Standard_Boolean fk = Standard_False;
- const TopOpeBRepDS_DataStructure& DS = myHDS->DS();
- if ( ! TopOpeBRepDS::IsTopology(K) ) return OS;
- if ( I <= 0 ) return OS;
- TopAbs_ShapeEnum t = TopOpeBRepDS::KindToShape(K);
-
- if ( DS.Shape(I,fk).ShapeType() != t ) return OS;
- Standard_Integer rankI = DS.AncestorRank(I);
- TCollection_AsciiString s1,s2;
- if(DS.KeepShape(I)) {
- s1 = ((rankI == 1) ? (char*) "*" : (char*) "");
- s2 = ((rankI == 2) ? (char*) "*" : (char*) "");
- }
- else {
- s1 = ((rankI == 1) ? (char*) "~" : (char*) "");
- s2 = ((rankI == 2) ? (char*) "~" : (char*) "");
- }
- TCollection_AsciiString ss = TopOpeBRepDS::SPrint(K,I,s1,s2);
-
- if ( t == TopAbs_VERTEX ) {
- Standard_Integer lk = ss.Length() + 3;
- TCollection_AsciiString istr(lk,' ');
- gp_Pnt P = TopOpeBRepTool_ShapeTool::Pnt(DS.Shape(I,fk));
- Standard_Real tol = TopOpeBRepTool_ShapeTool::Tolerance(DS.Shape(I,fk));
- OS<<"\n"<<ss<<" : ";
- OS<<"tol = "<<tol<<endl;
- OS<<istr; OS<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
- }
-
- Standard_Integer lss = ss.Length();TCollection_AsciiString bss(lss,' ');
- OS<<ss;OS.flush();
-
- // Interferences
- TopOpeBRepDS_InterferenceIterator it; it.Init(DS.ShapeInterferences(I));
- if (it.More()) {
- OS<<" interferences :\n";
- for (;it.More();it.Next()) {
- const Handle(TopOpeBRepDS_Interference)& IR = it.Value(); Standard_Boolean s = Standard_True;
- if (TopOpeBRepDS_GLOBALHDSinterfselector == 1)
- s = !(Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(IR)).IsNull();
- if (s) IR->Dump(OS,"","\n");
- }
- }
- else OS<<" has no interference\n";
-
- // SameDomain
- const TopoDS_Shape& S = myHDS->Shape(I,fk);
- if ( myHDS->HasSameDomain(S) ) {
- const TopTools_ListOfShape& L = myHDS->DS().ShapeSameDomain(S);
- if ( L.Extent() ) {
- OS<<ss<<" same domain (r,o) : "<<SDumpRefOri(S)<<endl;
- OS<<SPrintShapeRefOri(L,bss+" same domain shapes : ");
- }
- }
-
- OS.flush();
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpTopology
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpTopology(const TopAbs_ShapeEnum
-#ifdef OCCT_DEBUG
- T
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- I
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- DumpTopology(TopOpeBRepDS::ShapeToKind(T),I,OS);
-#endif
- return OS;
-}
-
//=======================================================================
//function : SDumpRefOri
//purpose :
return SS;
}
-//=======================================================================
-//function : DumpRefOri
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpRefOri(const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- I
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<SDumpRefOri(K,I);OS.flush();
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpRefOri
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpRefOri(const TopoDS_Shape&
-#ifdef OCCT_DEBUG
- S
-#endif
- ,Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<SDumpRefOri(S);OS.flush();
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpLOI
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Dumper::DumpLOI(
- const TopOpeBRepDS_ListOfInterference&
-#ifdef OCCT_DEBUG
- L
-#endif
- ,Standard_OStream& OS,
- const TCollection_AsciiString&
-#ifdef OCCT_DEBUG
- str
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- OS<<str;
- TopOpeBRepDS_InterferenceIterator IT(L); if (!IT.More()) { OS<<"NO INTERFERENCE"<<endl; return OS; }
- OS<<endl;
- for (Standard_Integer ip = 1; IT.More(); IT.Next(),ip++ ) {
- const Handle(TopOpeBRepDS_Interference)& I = IT.Value();
- TCollection_AsciiString s(ip); s = s + "/ ";
- DumpI(I,OS,s,"\n");
- }
- OS<<endl;
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpI
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Dumper::DumpI(
- const Handle(TopOpeBRepDS_Interference)&
-#ifdef OCCT_DEBUG
- I
-#endif
- ,Standard_OStream& OS
- ,const TCollection_AsciiString&
-#ifdef OCCT_DEBUG
- str1
-#endif
- ,const TCollection_AsciiString&
-#ifdef OCCT_DEBUG
- str2
-#endif
- ) const
-{
-#ifdef OCCT_DEBUG
- Standard_Boolean fk = Standard_False;
- OS<<str1;
- if (I.IsNull()) { OS<<"NULL INTERFERENCE"<<str2; return OS; }
- Standard_Integer G = I->Geometry(); TopOpeBRepDS_Kind GK = I->GeometryType();
- I->Dump(OS);
- if (GK == TopOpeBRepDS_POINT) {
- gp_Pnt P = myHDS->Point(G).Point();
- OS<<" P = "<<P.X()<<" "<<P.Y()<<" "<<P.Z();
- }
- else if (GK == TopOpeBRepDS_VERTEX) {
- gp_Pnt P = TopOpeBRepTool_ShapeTool::Pnt(myHDS->Shape(G,fk));
- OS<<" V = "<<P.X()<<" "<<P.Y()<<" "<<P.Z();
- }
- OS<<str2;
- OS.flush();
-#endif
- return OS;
-}
-
//=======================================================================
//function : SPrintShape
//purpose :
Standard_EXPORT TopOpeBRepDS_Dumper(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
-
- Standard_EXPORT static Standard_OStream& PrintType (const Handle(Geom_Curve)& C, Standard_OStream& S);
-
- Standard_EXPORT static Standard_OStream& PrintType (const Handle(Geom2d_Curve)& C, Standard_OStream& S);
-
- Standard_EXPORT static Standard_OStream& Print (const gp_Pnt& P, Standard_OStream& S);
-
- Standard_EXPORT static Standard_OStream& Print (const gp_Pnt2d& P, Standard_OStream& S);
-
- Standard_EXPORT static Standard_OStream& Print (const Handle(Geom_BSplineCurve)& C, Standard_OStream& S, const Standard_Boolean c = Standard_True);
-
- Standard_EXPORT static Standard_OStream& Print (const Handle(Geom2d_BSplineCurve)& C, Standard_OStream& S, const Standard_Boolean c = Standard_True);
-
- Standard_EXPORT static Standard_OStream& Print (const Handle(Geom_Curve)& C, Standard_OStream& S, const Standard_Boolean c = Standard_True);
-
- Standard_EXPORT static Standard_OStream& Print (const Handle(Geom2d_Curve)& C, Standard_OStream& S, const Standard_Boolean c = Standard_True);
-
- Standard_EXPORT Standard_OStream& Dump (Standard_OStream& OS, const Standard_Boolean fk = Standard_False, const Standard_Boolean ct = Standard_True) const;
-
- Standard_EXPORT Standard_OStream& DumpGeometry (Standard_OStream& OS, const Standard_Boolean fk = Standard_False, const Standard_Boolean ct = Standard_True) const;
-
- Standard_EXPORT Standard_OStream& DumpGeometry (const TopOpeBRepDS_Kind K, Standard_OStream& OS, const Standard_Boolean fk = Standard_False, const Standard_Boolean ct = Standard_True) const;
-
- Standard_EXPORT Standard_OStream& DumpGeometry (const TopOpeBRepDS_Kind K, const Standard_Integer I, Standard_OStream& OS, const Standard_Boolean fk = Standard_False, const Standard_Boolean ct = Standard_True) const;
-
- Standard_EXPORT Standard_OStream& DumpTopology (Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpTopology (const TopOpeBRepDS_Kind K, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpTopology (const TopAbs_ShapeEnum T, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpTopology (const TopOpeBRepDS_Kind K, const Standard_Integer I, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpTopology (const TopAbs_ShapeEnum T, const Standard_Integer I, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpSectionEdge (const TopOpeBRepDS_Kind K, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpSectionEdge (const TopOpeBRepDS_Kind K, const Standard_Integer I, Standard_OStream& OS) const;
-
+
Standard_EXPORT TCollection_AsciiString SDumpRefOri (const TopOpeBRepDS_Kind K, const Standard_Integer I) const;
Standard_EXPORT TCollection_AsciiString SDumpRefOri (const TopoDS_Shape& S) const;
-
- Standard_EXPORT Standard_OStream& DumpRefOri (const TopOpeBRepDS_Kind K, const Standard_Integer I, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpRefOri (const TopoDS_Shape& S, Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpLOI (const TopOpeBRepDS_ListOfInterference& L, Standard_OStream& O, const TCollection_AsciiString& s) const;
-
- Standard_EXPORT Standard_OStream& DumpI (const Handle(TopOpeBRepDS_Interference)& I, Standard_OStream& O, const TCollection_AsciiString& s1, const TCollection_AsciiString& s2) const;
-
+
Standard_EXPORT TCollection_AsciiString SPrintShape (const Standard_Integer I) const;
Standard_EXPORT TCollection_AsciiString SPrintShape (const TopoDS_Shape& S) const;
#include <TopOpeBRepTool_EXPORT.hxx>
#include <TopOpeBRepTool_TOOL.hxx>
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_reDEB.hxx>
-Standard_EXPORT void debredpnc(const Standard_Integer ie){cout<<"+++ debredpnc e"<<ie<<endl;}
-extern Standard_Boolean TopOpeBRepDS_GetcontextNOPNC();
-#endif
-
#define M_FORWARD(O) (O == TopAbs_FORWARD)
#define M_REVERSED(O) (O == TopAbs_REVERSED)
#define M_INTERNAL(O) (O == TopAbs_INTERNAL)
//------------------------------------------------------
static void FDS_reduceONFACEinterferences(TopOpeBRepDS_ListOfInterference& LI,
const TopOpeBRepDS_DataStructure& /*BDS*/,
- const Standard_Integer
-#ifdef OCCT_DEBUG
- EIX
-#endif
- )
+ const Standard_Integer)
//------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"reduceONFACEinterferences on "<<EIX<<" <- "<<LI.Extent()<<endl;
-#endif
TopOpeBRepDS_ListIteratorOfListOfInterference it1; // set hasONFACE = True if LI contains interfs with (ON,FACE) transition(s).
Standard_Boolean hasONFACE = Standard_False;
}
}
-#ifdef OCCT_DEBUG
- if(TRC){if( hasONFACE)cout<<"egde "<<EIX<<" has (ON,FACE)"<<endl;}
- if(TRC){if(!hasONFACE)cout<<"egde "<<EIX<<" has no (ON,FACE)"<<endl;}
-#endif
-
if ( hasONFACE ) {
// LI has (ON,FACE) : remove all other interf (POINT,(not(ON,FACE)))
it1.Initialize(LI);
else it1.Next();
}
}
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"reduceONFACEinterferences E"<<EIX<<" -> "<<LI.Extent()<<endl<<endl;
-#endif
}
//------------------------------------------------------
// <LI> -> <reducedLI> + <LI>
{
reducedLI.Clear();
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(SIX);
- TRC = Standard_False; //MOINSTRACE
- if(TRC) {cout<<endl; debreducer3d(SIX);}
- if (TRC) cout<<endl<<"ReducerEdge3d E"<<SIX<<" <- "<<LI.Extent()<<endl;
-#endif
+
Standard_Integer n3d = LI.Extent();
if (n3d <= 1) return;
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(SIX));
Standard_Boolean sdm = FUN_ds_sdm(BDS,E,E1);
if (sdm) {
-#ifdef OCCT_DEBUG
- if (TRC) cout<<" NO I3d : e"<<SIX<<" same domain with e"<<S1<<endl;
-#endif
+
it2.Next(); continue;
}
isComplex = Standard_True;
EFITool.Init(E,E1,F1,I1);
EFITool.Add(E,E1,F1,I1);
-#ifdef OCCT_DEBUG
- if(TRC){cout<<endl<<"complex T3d E"<<SIX<<endl;I1->Dump(cout,"init :","\n");}
-#endif
} // !isComplex
-#ifdef OCCT_DEBUG
- if(TRC) I2->Dump(cout,"add : ","\n");
-#endif
EFITool.Add(E,E2,F2,I2);
LI.Remove(it2);
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"resulting : "; Handle(TopOpeBRepDS_Interference) IBID = new TopOpeBRepDS_Interference();
- EFITool.Transition(IBID);IBID->Transition().Dump(cout);cout<<endl;}
-#endif
} // it2
if (isComplex) {
newI = new TopOpeBRepDS_CurvePointInterference(T,TopOpeBRepDS_FACE,IB1,TopOpeBRepDS_POINT,G1,CPI->Parameter());
}
-#ifdef OCCT_DEBUG
- if (TRC){cout<<"reduced T E"<<SIX<<" ";newI->Dump(cout);cout<<endl;}
-#endif
if (!newI.IsNull()) {
reducedLI.Append(newI);
LI.Remove(it1);
else
it1.Next();
} // it1
-
-#ifdef OCCT_DEBUG
- if (TRC) {
- cout<<"ReducerEdge3d E"<<SIX<<" -> nIreduced "<<reducedLI.Extent();
- cout<<" + nInonreduced "<<LI.Extent()<<endl<<endl;
- }
-#endif
}
//------------------------------------------------------
TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_ListOfInterference& reducedLI)
//------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(SIX);
-// TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"ReducerEdge E"<<SIX<<" <- nI "<<LI.Extent()<<endl;
-#endif
-
FDS_repvg(BDS,SIX,TopOpeBRepDS_VERTEX,LI,reducedLI);
FDS_reduceONFACEinterferences(LI,BDS,SIX);
FDS_repvg(BDS,SIX,TopOpeBRepDS_POINT,LI,reducedLI);
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"ReducerEdge E"<<SIX<<" -> nI "<<LI.Extent()<<endl<<endl;
-#endif
}
//------------------------------------------------------
{
reducedLI.Clear();
Standard_Integer nI = LI.Extent();
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(SIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"ReducerSDEdge E"<<SIX<<" <- nI "<<nI<<endl;
-#endif
+
if (nI <= 1) return;
TopOpeBRepDS_ListOfInterference newLI;
} // tki
LI.Clear(); LI.Append(newLI);
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"ReducerSDEdge E"<<SIX<<" -> nI "<<LI.Extent()<<endl<<endl;
-#endif
}
//------------------------------------------------------
// I2 = (IN/OU(SE),VG,SE))} -> Ir = (IN/IN(SE),VG,SE)
{
reducedLI.Clear();
-#ifdef OCCT_DEBUG
- Standard_Integer nI = LI.Extent(); // DEB
-#endif
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(SIX));
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(SIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"reclSE2 E"<<SIX<<" <- nI "<<nI<<endl;
-#endif
-
TopOpeBRepDS_ListIteratorOfListOfInterference it1(LI);
while (it1.More()) {
const Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
if (O2 != cO1) {it2.Next(); continue;}
LI.Remove(it2);
-#ifdef OCCT_DEBUG
- nI = LI.Extent(); // DEB
-#endif
hascO = Standard_True; break;
} //it2
if (hascO) {
I1->ChangeTransition().Set(TopAbs_INTERNAL);
reducedLI.Append(I1); LI.Remove(it1);
-#ifdef OCCT_DEBUG
- nI = LI.Extent(); // DEB
-#endif
}
else it1.Next();
} //it1
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"reclSE2 E"<<SIX<<" -> nI "<<LI.Extent()<<endl<<endl;
-#endif
} // FUN_reclSE2
//------------------------------------------------------
//------------------------------------------------------
{
TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LOI);
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"reclSE E"<<EIX<<" <- "<<LOI.Extent()<<endl;
- if (TRC) tki.DumpTKIIterator("","\n");
-#endif
LOI.Clear();
for (tki.Init(); tki.More(); tki.Next()) {
TopOpeBRepDS_Kind K; Standard_Integer G; tki.Value(K,G);
if (K != TopOpeBRepDS_VERTEX) continue;
-
-#ifdef OCCT_DEBUG
- if (TRC) {tki.DumpTKI(K,G,"","\n");}
-#endif
+
TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G); TopOpeBRepDS_ListOfInterference Rloi;
Standard_Integer nloi = loi.Extent();
if (nloi == 0) continue;
LOI.Append(loi); RLOI.Append(Rloi);
}
}
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"reclSE E"<<EIX<<" -> reste "<<LOI.Extent()<<" + reduit "<<RLOI.Extent()<<endl<<endl;
-#endif
} // FUN_reclSE
//------------------------------------------------------
// LI = {I attached to <E> = (T,G,S)}, unkeep I = EVI with G = vertex of <E>
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) {cout<<endl;debreducerE(EIX);}
-#endif
-
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(EIX));
TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
const TopoDS_Vertex& V = TopoDS::Vertex(BDS.Shape(G));
Standard_Integer o = FUN_tool_orientVinE(V,E);
if (o == 0){it.Next(); continue;}
-#ifdef OCCT_DEBUG
- if (TRC) {cout<<"-> rejet EVI on Gb 1 on "<<EIX<<" : ";I->Dump(cout);cout<<endl;}
-#endif
- LI.Remove(it);
- }
-}
-
-// ---------------------------------------------------------
-//unreferenced function, commented
-/*#ifdef OCCT_DEBUG
-static void FUN_reorder(const Standard_Integer EIX, const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopOpeBRepDS_ListOfInterference& LIR, TopOpeBRepDS_ListOfInterference& LI, TopOpeBRepDS_ListOfInterference& LIend)
-// ---------------------------------------------------------
-// at same G :in <LI> I =(T, G, S)
-// in <LRI> Ir =(Tr,G,Sr)
-// I gives less information than reduced Ir
-{
-
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"FUN_reorder :"<<endl;
- TopOpeBRepDS_Dumper DSD(HDS);
-
- LIend.Clear();
- TopOpeBRepDS_TKI tki;
- tki.FillOnGeometry(LI);
-
- TopOpeBRepDS_TKI tkiR;
- tkiR.FillOnGeometry(LIR);
-
- for (tkiR.Init(); tkiR.More(); tkiR.Next()) {
- TopOpeBRepDS_Kind K; Standard_Integer G; tkiR.Value(K,G);
-
- tki.Init();
- Standard_Boolean isbound = tki.IsBound(K,G);
- if (!isbound) continue;
-
- TopOpeBRepDS_ListOfInterference& loiR = tkiR.ChangeValue(K,G);
- TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G);
-#ifdef OCCT_DEBUG
- if (TRC) {TCollection_AsciiString bb("lIreduced");bb += TCollection_AsciiString(G);DSD.DumpLOI(loiR,cout,bb);
- TCollection_AsciiString aa("lI");aa+=TCollection_AsciiString(G);DSD.DumpLOI(loi,cout,aa);}
-#endif
- loiR.Append(loi);
- }
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"-> ordered :"<<endl;
-#endif
- for (tkiR.Init(); tkiR.More(); tkiR.Next()) {
- TopOpeBRepDS_Kind K; Standard_Integer G; TopOpeBRepDS_ListOfInterference& loi = tkiR.ChangeValue(K,G);
-#ifdef OCCT_DEBUG
- if (TRC) {TCollection_AsciiString aa("lI");aa+=TCollection_AsciiString(G);DSD.DumpLOI(loi,cout,aa);}
-#endif
- LIend.Append(loi);
- }
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"-> residual :"<<endl;
-#endif
- for (tki.Init(); tki.More(); tki.Next()) {
- TopOpeBRepDS_Kind K; Standard_Integer G; TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G);
-#ifdef OCCT_DEBUG
- if (TRC) {TCollection_AsciiString aa("lI");aa+=TCollection_AsciiString(G);DSD.DumpLOI(loi,cout,aa);}
-#endif
- LIend.Append(loi);
+ LI.Remove(it);
}
}
-#endif
-*/
-
-static void FUN_keepl3dF(const Standard_Integer
-#ifdef OCCT_DEBUG
- SIX
-#endif
- ,const Handle(TopOpeBRepDS_HDataStructure)&
-#ifdef OCCT_DEBUG
- HDS
-#endif
+static void FUN_keepl3dF(const Standard_Integer, const Handle(TopOpeBRepDS_HDataStructure)&
,const TopOpeBRepDS_ListOfInterference& l3dF
,const TopOpeBRepDS_ListOfInterference& LR3dFE,
TopOpeBRepDS_ListOfInterference& l3dFkeep)
//purpose : soit I de l3dF, on cherche IR interf dans LR3dFE de meme geometrie
// si on n'en trouve pas, l3dFkeep += I
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(SIX);
- TRC = Standard_False; //MOINSTRACE
- if (TRC) cout<<endl<<"keepl3dF E"<<SIX<<endl;
- TopOpeBRepDS_Dumper DSD(HDS);
-#endif
-
TopOpeBRepDS_TKI tki;
tki.FillOnGeometry(l3dF);
Standard_Boolean isbound = tkiR.IsBound(K,G);
if (!isbound) {l3dFkeep.Append(loi);}
-#ifdef OCCT_DEBUG
- if (TRC) {TCollection_AsciiString bb("l3dFkeep");bb += TCollection_AsciiString(G);DSD.DumpLOI(loi,cout,bb);cout<<endl;}
-#endif
}
} // FUN_keepl3dF
}
static void FUN_ProcessEdgeInterferences(const Standard_Integer EIX
, const TopOpeBRepDS_Kind
-#ifdef OCCT_DEBUG
- K
-#endif
,const Standard_Integer
-#ifdef OCCT_DEBUG
- G
-#endif
, const Handle(TopOpeBRepDS_HDataStructure)& HDS,
TopOpeBRepDS_ListOfInterference& LI)
{
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
const TopoDS_Shape& E = BDS.Shape(EIX);
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- if (TRC) {
- cout<<endl;debreducerE(EIX);cout<<"EIR E"<<EIX;
- if(K==TopOpeBRepDS_POINT)cout<<",point";
- else cout<<",vertex";
- cout<<G<<endl;
- }
-#endif
// LI -> (lF + lFE) + lE + [LI]
// lF = {interference on edge <EIX> : (T(face),G=POINT/VERTEX,S)
TopOpeBRepDS_ListOfInterference lFE; FUN_selectSKinterference(lF,TopOpeBRepDS_EDGE,lFE);
TopOpeBRepDS_ListOfInterference lE; FUN_selectTRASHAinterference(LI,TopAbs_EDGE,lE);
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_Dumper DSD(HDS);
- Standard_Boolean trcl = TRC;
-// trcl = Standard_False; // MOINSTRACE
-#endif
-
// xpu210798 : CTS21216 (e7,G=P3,S=E9,FTRASHA=f8,f10)
// EIX is section edge
// 2dI1=(REVERSED(ftrasha1),G,ES), 2dI2=(FORWARD(ftrasha2),G,ES)
// lF -> lF
// lFE -> lI2dFE + [lFE] / lI2dFE={FEI=(T(FTRASHA),G,SE) : no FFI=(T(FTRASHA),G,FTRASHA)}
FUN_selectpure2dI(lF,lFE,lI2dFE);
-#ifdef OCCT_DEBUG
- if (trcl) {
- cout<<endl<<"lI2dFE -> lRI2dFE + lI2dFE"<<endl;
- TCollection_AsciiString aa("lI2dFE :"); DSD.DumpLOI(lI2dFE,cout,aa);
- }
-#endif
::FUN_reducepure2dI(lI2dFE,lRI2dFE); // lI2dFE -> lRI2dFE + lI2dFE
-#ifdef OCCT_DEBUG
- if (trcl) { TCollection_AsciiString bb("lRI2dFE :"); DSD.DumpLOI(lRI2dFE,cout,bb);}
-#endif
lFE.Append(lI2dFE); lFE.Append(lRI2dFE);
}
TopOpeBRepDS_ListOfInterference l1dE; FUN_select2dI(EIX,BDS,TopAbs_EDGE,lE,l1dE);
TopOpeBRepDS_ListOfInterference l1dEsd; FUN_select1dI(EIX,BDS,lE,l1dEsd);
-#ifdef OCCT_DEBUG
- if (trcl) {
- cout<<"lFE("<<EIX<<") -> l3dFE (S=EDGE) [+l3dFEresi] + l2dFE + [lFE +lFEresi]"<<endl;
- TCollection_AsciiString oo("lFE :");DSD.DumpLOI(lFE,cout,oo);
- TCollection_AsciiString pp("lFEresi :");DSD.DumpLOI(lFEresi,cout,pp);
- TCollection_AsciiString bb("l3dFE :");DSD.DumpLOI(l3dFE,cout,bb);
- TCollection_AsciiString bb1("l3dFEresi :");DSD.DumpLOI(l3dFEresi,cout,bb1);
- TCollection_AsciiString ll("l2dFE :");DSD.DumpLOI(l2dFE,cout,ll);
- cout<<"lF("<<EIX<<") -> l3dF (S=FACE) [+lF]"<<endl;
- TCollection_AsciiString cc("lF :"); DSD.DumpLOI(lF,cout,cc);
- TCollection_AsciiString aa("l3dF :"); DSD.DumpLOI(l3dF,cout,aa);
- cout<<"lE("<<EIX<<") -> l1dE + lE"<<endl;
- TCollection_AsciiString ee("lE :"); DSD.DumpLOI(lE,cout,ee);
- TCollection_AsciiString ff("l1dE :"); DSD.DumpLOI(l1dE,cout,ff);
- TCollection_AsciiString gg("l1dEsd :"); DSD.DumpLOI(l1dEsd,cout,gg);}
-#endif
-
// reducer3d :
// ----------
// l3dFE -> lR3dFE [+l3dFE (non reduced 3dI)]
TopOpeBRepDS_ListOfInterference lR3dFE; FUN_ReducerEdge3d(EIX,BDS,l3dFE,lR3dFE);
-#ifdef OCCT_DEBUG
- if (trcl) { cout<<"l3dFE("<<EIX<<") -> lR3dFE + l3dFE"<<endl;
- TCollection_AsciiString aa("lR3dFE :");DSD.DumpLOI(lR3dFE,cout,aa);
- TCollection_AsciiString bb("l3dFE :"); DSD.DumpLOI(l3dFE,cout,bb);}
-#endif
// FUN_unkeepEVIonGb1(BDS,EIX,l1dE); // filter :
// FUN_unkeepEVIonGb1(BDS,EIX,l2dFE); // filter :
FUN_unkeepEVIonGb1(BDS,EIX,LI); // filter :
}
//FUN_unkeepEVIonGb1(BDS,EIX,LI); // filter :
-
-#ifdef OCCT_DEBUG
- if (TRC){TCollection_AsciiString aa("reduced->");DSD.DumpLOI(LI,cout,aa);}
-#endif
} // ProcessEdgeInterferences
//=======================================================================
{
TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
-#ifdef OCCT_DEBUG
- TopOpeBRepDS_Dumper DSD(myHDS);
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- if (TRC) {cout<<endl;debreducerE(EIX);}
-#endif
-
// E is the edge, LI is list of interferences to compact
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(EIX));
Standard_Boolean isdg = BRep_Tool::Degenerated(E);
Standard_Real par = FDS_Parameter(I);
Handle(TopOpeBRepDS_Interference) newI = MakeEPVInterference(I->Transition(),S,OOG,par,K,ST,Standard_False);
newloi.Append(newI);
-#ifdef OCCT_DEBUG
- if (TRC) {cout<<"on e"<<EIX;I->Dump(cout);cout<<"gives ";newI->Dump(cout);cout<<endl;}
-#endif
}
newtki.ChangeInterferences(K,G).Clear();
if (!isb) newtki.Add(K,OOG);
LI.Append(LInew);
Standard_Boolean performPNC = Standard_False; // JYL 28/09/98 : temporaire
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GetcontextNOPNC()) performPNC = Standard_False;
- if (TRC) debredpnc(EIX);
-#endif
+
if (!performPNC) return;
// suppression des I/G(I) n'est accede par aucune courbe
}
const TopTools_ListOfShape& lfx = FDSCNX_EdgeConnexitySameShape(E,myHDS);
-#ifdef OCCT_DEBUG
-// Standard_Integer nlfx = lfx.Extent();
-#endif
// nlfx < 2 => 0 ou 1 face accede E => pas d'autre fcx pouvant generer une courbe 3d
TopTools_ListIteratorOfListOfShape itlfx(lfx);
if (curvefound) break;
} // itlfx.More()
-#ifdef OCCT_DEBUG
-// Standard_Integer nLI = LI.Extent();
-#endif
if (curvefound) {
LI.Append(loi);
}
- else {
-#ifdef OCCT_DEBUG
-// if (TRC) {
-// debredpnc(EIX);
- TCollection_AsciiString ss = "\n--- TopOpeBRepDS_EIR::ProcessEdgeInterferences : suppress pnc of E"; ss = ss + EIX;
- DSD.DumpLOI(loi,cout,ss);
-// }
-#endif
- }
-
} // tki.More()
} // (!isfafa)
#include <TopOpeBRepDS_TOOL.hxx>
#include <TopOpeBRepDS_define.hxx>
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_reDEB.hxx>
-#include <TopOpeBRepDS_EdgeVertexInterference.hxx>
-#include <TopOpeBRepDS_CurvePointInterference.hxx>
-#include <TopOpeBRepDS_FaceEdgeInterference.hxx>
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-Standard_EXPORT void debse1(const Standard_Integer i) {cout<<"+ debse1 se"<<i<<endl;}
-Standard_EXPORT void debse2(const Standard_Integer i) {cout<<"+ debse2 se"<<i<<endl;}
-Standard_EXPORT void debse3(const Standard_Integer i) {cout<<"+ debse3 se"<<i<<endl;}
-Standard_EXPORT void debse4(const Standard_Integer i) {cout<<"+ debse4 se"<<i<<endl;}
-Standard_EXPORT void debse5(const Standard_Integer i) {cout<<"+ debse5 se"<<i<<endl;}
-Standard_EXPORT void debse6(const Standard_Integer i) {cout<<"+ debse6 se"<<i<<endl;}
-Standard_EXPORT void debe7(const Standard_Integer i) {cout<<"+ debe7 se"<<i<<endl;}
-Standard_EXPORT void debse8(const Standard_Integer i) {cout<<"+ debse8 se"<<i<<endl;}
-Standard_EXPORT void debe9(const Standard_Integer i) {cout<<"+ debe9 se"<<i<<endl;}
-Standard_EXPORT void debgb1(const Standard_Integer i) {cout<<"+ debgb1 se"<<i<<endl;}
-Standard_EXPORT void debse9(const Standard_Integer i) {cout<<"+ debse9 se"<<i<<endl;}
-Standard_EXPORT void debsdm1(const Standard_Integer i) {cout<<"+ debsdm1 se"<<i<<endl;}
-Standard_EXPORT void debsamsha(const Standard_Integer i) {cout<<"+ debsamsha se"<<i<<endl;}
-Standard_EXPORT void debcompletefei(const Standard_Integer i) {cout<<"+ debcompletefei f"<<i<<endl;}
-#endif
-static void FUN_Raise()
-{
-#ifdef OCCT_DEBUG
-// cout<<"FUN_ds_completeforSE"<<endl;
-// Standard_ProgramError::Raise("FUN_ds_completeforSE");
-#endif
-}
-
#define M_IN(st) (st == TopAbs_IN)
#define M_ON(st) (st == TopAbs_ON)
#define M_OUT(st) (st == TopAbs_OUT)
}
}
-//------------------------------------------------------
-Standard_EXPORT void FDS_dumpLI
-//------------------------------------------------------
-#ifndef OCCT_DEBUG
-(const TopOpeBRepDS_ListOfInterference& ,const char* )
-{
-#else
-(const TopOpeBRepDS_ListOfInterference& LI,const char* str)
-{
- for(TopOpeBRepDS_ListIteratorOfListOfInterference itD(LI);itD.More();itD.Next()) {
- if(str) cout<<str; itD.Value()->Dump(cout); cout<<endl;
- }
-#endif
-}
-
//------------------------------------------------------
Standard_EXPORT void FDS_Tdata
//------------------------------------------------------
if (SI == 0) return Standard_False;
if (I.IsNull()) return Standard_False;
Standard_Boolean ya = Standard_False;
-
-#ifdef OCCT_DEBUG
-// const TopOpeBRepDS_Transition& T1 = I->Transition();
-#endif
+
TopAbs_ShapeEnum SB1,SA1;Standard_Integer IB1,IA1;TopOpeBRepDS_Kind GT1,ST1;Standard_Integer G1,S1;
FDS_Idata(I,SB1,IB1,SA1,IA1,GT1,G1,ST1,S1);
else if ( I->IsKind(STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference)) )
p = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I)->Parameter();
else {
-#ifdef OCCT_DEBUG
- cout<<"EdgeInterference : mauvais type d'interference"<<endl;
-#endif
Standard_Failure::Raise("FDS_Parameter");
}
return p;
TopTools_ListIteratorOfListOfShape it(lssd);
for (; it.More(); it.Next()) {
const TopoDS_Shape& esd = it.Value();
-#ifdef OCCT_DEBUG
-// Standard_Integer iesd = BDS.Shape(esd);
-// Standard_Integer resd = BDS.SameDomainInd(esd);
-#endif
TopOpeBRepDS_Config c = BDS.SameDomainOri(esd);
Standard_Boolean ok = Standard_True;
ok = ok && (c == TopOpeBRepDS_UNSHGEOMETRY);
TopTools_ListIteratorOfListOfShape it(lssd);
for (; it.More(); it.Next()) {
const TopoDS_Shape& esd = it.Value();
-#ifdef OCCT_DEBUG
-// Standard_Integer iesd = BDS.Shape(esd);
-// Standard_Integer resd = BDS.SameDomainInd(esd);
-#endif
TopOpeBRepDS_Config c = BDS.SameDomainOri(esd);
Standard_Boolean ok = (c == TopOpeBRepDS_SAMEORIENTED || c == TopOpeBRepDS_DIFFORIENTED);
if (ok) {
return Standard_False;
}
-//unreferenced function, commented
-/*#ifdef OCCT_DEBUG
-static Standard_Integer FUN_ds_FaceConnexitySameShape(const TopoDS_Vertex& V, const TopoDS_Edge& E, const Handle(TopOpeBRepDS_HDataStructure)& HDS,
- TopTools_ListOfShape& lFcx)
-// very expensive, but found no other way (nyi : modify DS_connex.cxx)
-{
- lFcx.Clear();
-#ifdef OCCT_DEBUG
-// const TopOpeBRepDS_DataStructure& BDS = HDS->DS();
-#endif
- const TopTools_ListOfShape& lf1 = FDSCNX_EdgeConnexitySameShape(E,HDS);
- Standard_Integer nlf1 = lf1.Extent();
- if (nlf1 < 2) return Standard_False;
-
- TopTools_MapOfShape mapf;
- TopTools_ListIteratorOfListOfShape it1(lf1);
- for (; it1.More(); it1.Next()){
- const TopoDS_Shape& f = it1.Value();
- mapf.Add(f);
- TopExp_Explorer exe(f,TopAbs_EDGE);
- for (; exe.More(); exe.Next()){
- const TopoDS_Edge& e = TopoDS::Edge(exe.Current());
- if (e.IsSame(E)) continue;
- Standard_Integer iori = FUN_tool_orientVinE(V,e);
- if (iori == 0) continue;
- const TopTools_ListOfShape& lf2 = FDSCNX_EdgeConnexitySameShape(e,HDS);
- TopTools_ListIteratorOfListOfShape it2(lf2);
- for (; it2.More(); it2.Next()) mapf.Add(it2.Value());
- } // exe
- } // it1
- TopTools_MapIteratorOfMapOfShape itm(mapf);
- for (; itm.More(); itm.Next()) lFcx.Append(itm.Key());
- return lFcx.Extent();
-}
-#endif*/
-
// ----------------------------------------------------------------------
Standard_EXPORT void FUN_ds_PURGEforE9(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
// ----------------------------------------------------------------------
if (isdgE) continue;
Standard_Integer IE = BDS.Shape(E);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(IE);
- if (trc) debe9(IE);
-#endif
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(E);
TopOpeBRepDS_ListOfInterference LIcopy; FDS_assign(LI,LIcopy);
TopOpeBRepDS_ListOfInterference l3dF; Standard_Integer n3dF = FUN_selectSKinterference(LIcopy,TopOpeBRepDS_FACE,l3dF);
if (!foundinsdm) {it.Next(); continue;} // E is IN geometry(F) (cto002D2;e33,f31)
// E is edge of FF sdm with F
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"-> SE9 removing I3dF :";I->Dump(cout);cout<<endl;}
-#endif
removed = Standard_True; l3dF.Remove(it);
} //it(l3dF)
const TopoDS_Edge& SE = BDS.SectionEdge(i);
Standard_Integer ISE = BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse1(ISE);
-#endif
TopOpeBRepDS_TKI tki;
tki.FillOnGeometry(LI);
it.Initialize(lI3) ;
for ( ;it.More(); it.Next()){
const Handle(TopOpeBRepDS_Interference)& I = it.Value();
-#ifdef OCCT_DEBUG
-// const TopOpeBRepDS_Transition& T = I->Transition();
-#endif
TopOpeBRepDS_Kind GT,ST;
Standard_Integer G1,S;
FDS_data(I,GT,G1,ST,S);
// -> do NOT reduce to I = (INTERNAL(IfES),G1,S) (we can have EXTERNAL Tr)
FDS_copy(loi,loicopy);
TopOpeBRepDS_ListOfInterference lI4;
-#ifdef OCCT_DEBUG
-// Standard_Integer nI4 =
-#endif
- FUN_selectITRASHAinterference(loicopy,IfES,lI4);
+ FUN_selectITRASHAinterference(loicopy,IfES,lI4);
Standard_Boolean hasFORREV=Standard_False;
TopOpeBRepDS_ListOfInterference lfor; Standard_Integer nFOR = FUN_selectTRAORIinterference(lI4,TopAbs_FORWARD,lfor);
TopOpeBRepDS_ListOfInterference lrev; Standard_Integer nREV = FUN_selectTRAORIinterference(lI4,TopAbs_REVERSED,lrev);
Standard_Boolean B = Standard_False;
if (isevi) B = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I)->GBound();
Handle(TopOpeBRepDS_Interference) newI = MakeEPVInterference(newT,S,G1,par,K,TopOpeBRepDS_EDGE,B);
-#ifdef OCCT_DEBUG
- if (trc) {
- cout<<"completeforSE1 on section edge "<<ISE<<" ";
- newI->Dump(cout);
- cout<<endl;
- }
-#endif
HDS->StoreInterference(newI,SE);
break;
} // it(lI3)
for (Standard_Integer i = 1; i <= nse; i++) {
const TopoDS_Edge& SE = TopoDS::Edge(BDS.SectionEdge(i));
Standard_Integer rkSE = BDS.AncestorRank(SE);
-#ifdef OCCT_DEBUG
- Standard_Integer ISE =
-#endif
- BDS.Shape(SE);
+ BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse2(ISE);
-#endif
TopOpeBRepDS_TKI tki;
tki.FillOnGeometry(LI);
// has NO {I'=(T'(face'), G not Gbound, face')}
TopOpeBRepDS_ListOfInterference loicopy; FDS_assign(loi,loicopy);
TopOpeBRepDS_ListOfInterference l1;
-#ifdef OCCT_DEBUG
-// Standard_Integer nI =
-#endif
- FUN_selectTRASHAinterference(loicopy,TopAbs_FACE,l1);
+ FUN_selectTRASHAinterference(loicopy,TopAbs_FACE,l1);
TopOpeBRepDS_ListOfInterference lF; Standard_Integer nF = FUN_selectSKinterference(l1,TopOpeBRepDS_FACE,lF);
if (nF > 1) continue;
TopOpeBRepDS_ListOfInterference lFE; Standard_Integer nFE = FUN_selectSKinterference(l1,TopOpeBRepDS_EDGE,lFE);
// I = (T(FTRA),G not Gbound, ES)
const Handle(TopOpeBRepDS_Interference)& I = lFE.First();
Standard_Real par = FDS_Parameter(I);
-#ifdef OCCT_DEBUG
-// const TopOpeBRepDS_Transition& T = I->Transition();
-#endif
+
TopOpeBRepDS_Kind ST; Standard_Integer S; FDS_data(I,K,G,ST,S);
TopAbs_ShapeEnum tsb,tsa; Standard_Integer isb,isa; FDS_Tdata(I,tsb,isb,tsa,isa);
const TopoDS_Face& FTRA= TopoDS::Face(BDS.Shape(isb));
Standard_Real t1 = BDS.Point(G).Tolerance(); Standard_Real t2 = FUN_tool_maxtol(ES);
Standard_Real t = (t1 > t2) ? t1 : t2;
Standard_Real d = 1.e1;Standard_Boolean ok = FUN_tool_projPonE(p3d,ES,OOpar,d);
- if (!ok) {FUN_Raise(); continue;}
- if (d > t) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
+ if (d > t) {continue;}
}
if (vertex) { // rkG == rkES
const TopoDS_Vertex& vG = TopoDS::Vertex(BDS.Shape(G));
gp_Pnt p = BRep_Tool::Pnt(vG);
Standard_Real parES,dd=1.e1;
Standard_Boolean ok = FUN_tool_projPonE(p,ES,parES,dd);
- if (!ok) {FUN_Raise(); continue;}
- if (dd > t) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
+ if (dd > t) {continue;}
OOpar = parES;
}
else OOpar = BRep_Tool::Parameter(TopoDS::Vertex(oov),ES);
}
gp_Pnt2d OOuv; Standard_Boolean ok = FUN_tool_paronEF(ES,OOpar,FCX,OOuv);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
TopOpeBRepDS_Transition newT;
// -------
ok = MKT.Initialize(SE,par1,par2,par, FCX,OOuv, factor);
if (ok) ok = MKT.SetRest(ES,OOpar);
if (ok) ok = MKT.MkTonE(stb,sta);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
newT.Before(stb); newT.After(sta); newT.Index(IFCX);
Handle(TopOpeBRepDS_Interference) newI;
Standard_Boolean B = Standard_False;
if (vertex) B = Handle(TopOpeBRepDS_EdgeVertexInterference)::DownCast(I)->GBound();
newI = MakeEPVInterference(newT,IFCX,G,par,K,TopOpeBRepDS_FACE,B);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforSE2 on section edge "<<ISE<<" ";newI->Dump(cout);cout<<endl;}
-#endif
HDS->StoreInterference(newI,SE);
} // itfcx
} // tki
parE = FDS_Parameter(I3);
Standard_Real parline; Standard_Boolean ok = FUN_tool_parE(SE,parE,Eline,parline);
- if (!ok) {FUN_Raise(); return Standard_False;}
+ if (!ok) {return Standard_False;}
gp_Pnt2d uv; ok = FUN_tool_paronEF(Eline,parline,F,uv);
- if (!ok) {FUN_Raise(); return Standard_False;}
+ if (!ok) {return Standard_False;}
Standard_Real par1,par2; FUN_tool_bounds(SE,par1,par2);
Standard_Real factor = 1.e-4;
ok = MKT.Initialize(SE,par1,par2,parE, F,uv, factor);
if (ok) ok = MKT.SetRest(Eline,parline);
if (ok) ok = MKT.MkTonE(stb,sta);
- if (!ok) {FUN_Raise(); return Standard_False;}
+ if (!ok) {return Standard_False;}
Tr.Before(stb); Tr.After(sta); Tr.Index(ITRASHA);
return Standard_True;
}
const TopoDS_Edge& SE = BDS.SectionEdge(i);
Standard_Integer ISE = BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse3(ISE);
-#endif
TopOpeBRepDS_ListOfInterference newLI; Standard_Boolean hasnewLI = Standard_False;
TopOpeBRepDS_TKI tki;
// delete interferences =(T(face IF),G,S)
TopOpeBRepDS_ListOfInterference lIdel;
FUN_selectITRASHAinterference(loicopy,ITRASHA,lIdel);
-#ifdef OCCT_DEBUG
- if (trc) {FDS_dumpLI(lIdel,"completeforSE3, delete :");}
-#endif
Handle(TopOpeBRepDS_Interference) TrFE, TrFF;
//--------------
hasnewLI = Standard_True;
TrFE = MakeEPVInterference(Tr, ISE,G,parE,K,TopOpeBRepDS_EDGE,Standard_False);
TrFF = MakeEPVInterference(Tr,ITRASHA,G,parE,K,TopOpeBRepDS_FACE,Standard_False);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforSE3 on section edge "<<ISE<<" ";TrFE->Dump(cout);cout<<endl;}
- if (trc) {cout<<"completeforSE3 on section edge "<<ISE<<" ";TrFF->Dump(cout);cout<<endl;}
-#endif
-
newLI.Append(TrFF); newLI.Append(TrFE); newLI.Append(loicopy);
} // tki
if (pardef) parEG = paronEG;
else {
Standard_Real f,l; FUN_tool_bounds(Esp,f,l);
-#ifdef OCCT_DEBUG
- // Standard_Real x = 0.45678;
- // Standard_Real par = (1-x)*f + x*l;
-#endif
Standard_Real dEG; ok = FUN_tool_projPonE(P,EG,parEG,dEG);
if (!ok) return Standard_False;
if (dEG > tol) return Standard_False;
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
Standard_Integer ns = BDS.NbShapes();
for (Standard_Integer i= 1; i <= ns; i++) {
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(i);
- if (trc) debsdm1(i);
-#endif
const TopoDS_Shape& S = BDS.Shape(i);
if (S.ShapeType() != TopAbs_EDGE) continue;
const TopoDS_Edge& E = TopoDS::Edge(S);
Standard_Integer nse = BDS.NbSectionEdges();
for (Standard_Integer i = 1; i <= nse; i++) {
const TopoDS_Edge& SE = BDS.SectionEdge(i);
-#ifdef OCCT_DEBUG
- Standard_Integer ISE =
-#endif
- BDS.Shape(SE);
+ BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse4(ISE);
-#endif
TopOpeBRepDS_ListOfInterference newLI;
TopOpeBRepDS_TKI tki;
TopOpeBRepDS_Transition newT(newO); newT.Index(isb);
Standard_Real par = FDS_Parameter(I);
Handle(TopOpeBRepDS_Interference) newI = MakeEPVInterference(newT,S,G,par,K,Standard_False);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforSE4 on section edge "<<ISE<<" ";newI->Dump(cout);cout<<endl;}
-#endif
HDS->StoreInterference(newI,SE);
} // tki
} // i=1..nse
Standard_Integer nse = BDS.NbSectionEdges();
for (Standard_Integer i = 1; i <= nse; i++) {
const TopoDS_Edge& SE = BDS.SectionEdge(i);
-#ifdef OCCT_DEBUG
- Standard_Integer ISE =
-#endif
- BDS.Shape(SE);
+ BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LOI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse5(ISE);
-#endif
// xpu020399 : cto901A2 (e26)
TopOpeBRepDS_ListOfInterference LOIc; FDS_copy(LOI,LOIc);
for (; it.More(); it.Next()){
const Handle(TopOpeBRepDS_Interference)& I = it.Value();
Handle(TopOpeBRepDS_Interference) newI = I; newI->ChangeTransition().Set(newO);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforSE5 se"<<ISE<<"->";newI->Dump(cout);cout<<endl;}
-#endif
newLI.Append(I);
hasnewLI = Standard_True;
} // it
for (Standard_Integer i = 1; i <= nse; i++) {
const TopoDS_Edge& SE = BDS.SectionEdge(i);
Standard_Integer ISE = BDS.Shape(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse6(ISE);
-#endif
-
TopTools_ListOfShape lEsd3d; Standard_Boolean hassd3d = FDS_HasSameDomain3d(BDS,SE,&lEsd3d);
if (!hassd3d) continue;
}
TopOpeBRepDS_ListOfInterference l2dFE; FDS_assign(LIb,LIcopy);
-#ifdef OCCT_DEBUG
-// Standard_Integer n2d =
-#endif
- FUN_ds_hasI2d(ISE,LIcopy,l2dFE);
+ FUN_ds_hasI2d(ISE,LIcopy,l2dFE);
TopOpeBRepDS_ListOfInterference l1dE; FDS_assign(LIb,LIcopy);
-#ifdef OCCT_DEBUG
-// Standard_Integer n1d =
-#endif
- FUN_selectTRASHAinterference(LIcopy,TopAbs_EDGE,l1dE);
+ FUN_selectTRASHAinterference(LIcopy,TopAbs_EDGE,l1dE);
// attached to SE : l1dE = {I1d=(T(Esd),vG,Esd) / vG !hsd}
// l2dFE = {I2dF=(T(F),vG,E) / vG !hsd}
gp_Vec tgEsd; TopOpeBRepTool_TOOL::TggeomE(parEsd,Esd,tgEsd); // dir
gp_Vec tgE ; TopOpeBRepTool_TOOL::TggeomE(parE,SE,tgE); // dir
Standard_Real dot = tgEsd.Dot(tgE);
-#ifdef OCCT_DEBUG
- Standard_Real tola = Precision::Angular();
- if (Abs(dot) < tola) Standard_Failure::Raise("completeforSE6");
-#endif
Standard_Boolean SO = (dot > 0.);
Standard_Boolean isvf = (iv == 1);
Standard_Boolean isforw = (SO && isvf) || (!SO && !isvf);
}
newT.Index(iEsd);
Handle(TopOpeBRepDS_Interference) newI1d = MakeEPVInterference(newT,iEsd,G,parE,TopOpeBRepDS_VERTEX,Standard_False);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforS61 on section edge "<<ISE<<" ";newI1d->Dump(cout);cout<<endl;}
-#endif
HDS->StoreInterference(newI1d,SE);
} // it2d(l2dFE)
const TopoDS_Edge& E = TopoDS::Edge(EE);
Standard_Boolean isdgE = BRep_Tool::Degenerated(E);
if (isdgE) continue;
-
-#ifdef OCCT_DEBUG
- Standard_Integer IE =
-#endif
- BDS.Shape(E);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(IE);
- if (trc) debe7(IE);
-#endif
+ BDS.Shape(E);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(E);
TopOpeBRepDS_TKI tki;
TopOpeBRepDS_Kind K; Standard_Integer G; const TopOpeBRepDS_ListOfInterference& loi = tki.Value(K,G);
TopOpeBRepDS_ListOfInterference loicopy; FDS_assign(loi,loicopy);
TopOpeBRepDS_ListOfInterference l1;
-#ifdef OCCT_DEBUG
-// Standard_Integer n1 =
-#endif
- FUN_selectSKinterference(loicopy,TopOpeBRepDS_FACE,l1);
+ FUN_selectSKinterference(loicopy,TopOpeBRepDS_FACE,l1);
TopOpeBRepDS_ListOfInterference lFOR; Standard_Integer nFOR = FUN_selectTRAORIinterference(l1,TopAbs_FORWARD,lFOR);
TopOpeBRepDS_ListOfInterference lREV; Standard_Integer nREV = FUN_selectTRAORIinterference(l1,TopAbs_REVERSED,lREV);
if ((nFOR == 0) || (nREV == 0)) continue;
Standard_Integer IES = 0;
if (nFSE == 0) {
gp_Pnt2d uvFS; Standard_Boolean ok = FUN_tool_parF(E,par,FS,uvFS);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor);
if (ok) ok = MKT.MkTonE(stb,sta);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
newT.Before(stb); newT.After(sta);
}
else {
IES = lFSE.First()->Support();
const TopoDS_Edge& ES = TopoDS::Edge(BDS.Shape(IES));
Standard_Real parES; Standard_Boolean ok = FUN_tool_parE(E,par,ES,parES);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
gp_Pnt2d uvFS; ok = FUN_tool_paronEF(ES,parES,FS,uvFS);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
TopOpeBRepTool_makeTransition MKT; TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
ok = MKT.Initialize(E,par1,par2,par, FS,uvFS, factor);
if (ok) ok = MKT.SetRest(ES,parES);
if (ok) ok = MKT.MkTonE(stb,sta);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) {continue;}
newT.Before(stb); newT.After(sta);
}
if (iFS != 0) {
TopOpeBRepDS_ListOfInterference& loii = tki.ChangeValue(K,G);
TopOpeBRepDS_ListOfInterference lEFS;
-#ifdef OCCT_DEBUG
-// Standard_Integer nIFS =
-#endif
- FUN_selectITRASHAinterference(loii,iFS,lEFS);
+ FUN_selectITRASHAinterference(loii,iFS,lEFS);
for (TopOpeBRepDS_ListIteratorOfListOfInterference iti(lnewI); iti.More(); iti.Next()) {
Handle(TopOpeBRepDS_Interference) newI = iti.Value();
loii.Append(newI);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforE7 on edge "<<IE<<" ";newI->Dump(cout);cout<<endl;}
-#endif
}
}
} // tki
const TopoDS_Edge& SE = BDS.SectionEdge(i);
Standard_Integer ISE = BDS.Shape(SE);
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse8(ISE);
-#endif
Standard_Boolean hasnew = Standard_False;
TopOpeBRepDS_TKI tki;
for (tki.Init(); tki.More(); tki.Next()) {
TopOpeBRepDS_Kind KK; Standard_Integer GG; const TopOpeBRepDS_ListOfInterference& loi = tki.Value(KK,GG);
Standard_Boolean isvertex = (KK == TopOpeBRepDS_VERTEX);
-#ifdef OCCT_DEBUG
-// Standard_Boolean ispoint = (KK == TopOpeBRepDS_POINT);
-#endif
+
if (isvertex) {
Standard_Boolean Ghsdm = HDS->HasSameDomain(BDS.Shape(GG));
if (Ghsdm) continue;
TopOpeBRepDS_ListOfInterference li; FDS_assign(loi,li);
TopOpeBRepDS_ListOfInterference l1dE; Standard_Integer n1d = FUN_selectTRASHAinterference(li,TopAbs_EDGE,l1dE); // li->l1dE+li(<=>lF?)
TopOpeBRepDS_ListOfInterference lFE;
-#ifdef OCCT_DEBUG
-// Standard_Integer nFE =
-#endif
- FUN_selectSKinterference(li,TopOpeBRepDS_EDGE,lFE); // li(<=>lF?)->lFE+li(<=>lFF)
+ FUN_selectSKinterference(li,TopOpeBRepDS_EDGE,lFE); // li(<=>lF?)->lFE+li(<=>lFF)
TopOpeBRepDS_ListOfInterference l2dFE; Standard_Integer n2d = FUN_selectpure2dI(li,lFE,l2dFE); // lFE->l2dFE+lFE(<=>l3dFE)
-#ifdef OCCT_DEBUG
-// Standard_Integer n3d = lFE.Extent();
-#endif
-
Standard_Boolean redu2d = (n1d > 0)&&(n2d > 0);
// -------------------------------
if (redu2d) { // {I1d=(Tr(Esd),vG,Esd), I2d=(Tr(F),vG,E)}
TopOpeBRepDS_Transition newT2d; Standard_Boolean ok = FUN_ds_redu2d1d(BDS,ISE,I2dFE,l1dE, newT2d);
if (!ok) {it.Next(); continue;}
I2dFE->ChangeTransition() = newT2d; al2dFE.Append(I2dFE);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"SE8 -> on SE"<<ISE<<" reducedI :";I2dFE->Dump(cout);cout<<endl;}
-#endif
l2dFE.Remove(it);
}
l2dFE.Append(al2dFE);
const TopoDS_Edge& SE = BDS.SectionEdge(i);
Standard_Integer rkSE = BDS.AncestorRank(SE);
Standard_Integer ISE = BDS.Shape(SE);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(ISE);
- if (trc) debse9(ISE);
-#endif
Standard_Boolean hsd = HDS->HasSameDomain(SE);
if (!hsd) continue;
if (!BDS.ShapeInterferences(SE).IsEmpty()) continue;
TopOpeBRepDS_ListOfInterference LIcopy; FDS_assign(LI,LIcopy);
TopOpeBRepDS_ListOfInterference LISE;
-#ifdef OCCT_DEBUG
-// Standard_Integer nise =
-#endif
- FUN_selectSIinterference(LIcopy,ISE,LISE);
+ FUN_selectSIinterference(LIcopy,ISE,LISE);
TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LISE);
for (tki.Init(); tki.More(); tki.Next()) {
Standard_Integer G;
// const TopOpeBRepDS_ListOfInterference& loi =
tki.Value(K,G);
-#ifdef OCCT_DEBUG
-// const Handle(TopOpeBRepDS_Interference)& I = loi.First();
-// TopAbs_Orientation O = I->Transition().Orientation(TopAbs_IN);
-#endif
const TopoDS_Vertex& vG = TopoDS::Vertex(BDS.Shape(G));
Standard_Boolean hsd1 = HDS->HasSameDomain(vG);
if (hsd1) continue; //nyixpu011098
Standard_Real par = BRep_Tool::Parameter(vG,SE);
Handle(TopOpeBRepDS_Interference) newI = MakeEPVInterference(newT,iEsd,G,par,TopOpeBRepDS_VERTEX,TopOpeBRepDS_EDGE,Standard_True);
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"completeforSE6 on section edge "<<ISE<<" ";newI->Dump(cout);cout<<endl;}
-#endif
HDS->StoreInterference(newI,SE);
}
}//ite(EsdSE)
if (BDS.Shape(i).ShapeType() != TopAbs_EDGE) continue;
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(i));
-#ifdef OCCT_DEBUG
-// Standard_Boolean isse = BDS.IsSectionEdge(E);
-// Standard_Integer rkE = BDS.AncestorRank(E);
-#endif
Standard_Integer IE = BDS.Shape(E);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(IE);
- if (trc) debsamsha(IE);
-#endif
TopOpeBRepDS_TKI tki;
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(i);
tki.FillOnGeometry(LI);
TopOpeBRepDS_Kind K; Standard_Integer G; const TopOpeBRepDS_ListOfInterference& loi = tki.Value(K,G);
TopOpeBRepDS_ListOfInterference loicopy; FDS_copy(loi,loicopy); // loi -> l1+l2
TopOpeBRepDS_ListOfInterference l0;
-#ifdef OCCT_DEBUG
-// Standard_Integer n0 =
-#endif
- FUN_selectTRASHAinterference(loicopy,TopAbs_EDGE,l0);//xpu091198(cylcong)
+ FUN_selectTRASHAinterference(loicopy,TopAbs_EDGE,l0);//xpu091198(cylcong)
TopOpeBRepDS_ListOfInterference l1; Standard_Integer nfound = FUN_selectTRASHAinterference(loicopy,TopAbs_FACE,l1);
TopOpeBRepDS_ListOfInterference l2; nfound = FUN_selectSKinterference(l1,TopOpeBRepDS_EDGE,l2);
// l2 = {I=(T(faceTRASHA),G,Sedge)}
else break;
} //it1(li)
if (newI.IsNull()) continue;
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"redusamsha se"<<IE<<"FORWARD/REVERSED ->";newI->Dump(cout);cout<<endl;}
-#endif
li.Clear(); li.Append(newI);
}//tkis(l2)
//***
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
Standard_Integer ns = BDS.NbShapes();
for (Standard_Integer i = 1; i <= ns; i++) {
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(i);
- if (trc) debgb1(i);
-#endif
const TopoDS_Shape& s = BDS.Shape(i);
if (s.ShapeType() != TopAbs_EDGE) continue;
newloi.Append(I);
continue;
}
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"unkeepEVIonGb1 on e"<<i<<" ";I->Dump(cout);cout<<endl;}
-#endif
}
Standard_Integer nnewI = newloi.Extent();
Standard_Integer nI = loi.Extent();
} //FUN_ds_unkeepEVIonGb1*/
Standard_EXPORT Standard_Boolean FDS_LOIinfsup(
- const TopOpeBRepDS_DataStructure&
-#ifdef OCCT_DEBUG
- BDS
-#endif
- ,const TopoDS_Edge& E,
+ const TopOpeBRepDS_DataStructure&,
+ const TopoDS_Edge& E,
const Standard_Real pE,
const TopOpeBRepDS_Kind KDS,
const Standard_Integer GDS,
Standard_Real& paft,
Standard_Boolean& isonboundper)
{
-#ifdef OCCT_DEBUG
- Standard_Integer EIX = BDS.Shape(E);
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; // xpu170898
- if (TRC) cout<<endl<<"FDS_LOIinfsup.1 E"<<EIX<<" : "<<LOI.Extent()<<endl;
- if (TRC) debredpvg(EIX);
-#endif
-
Standard_Real f,l; FUN_tool_bounds(E,f,l);
pbef = f; paft = l;
Standard_Integer n = LOI.Extent();
TopOpeBRepDS_ListOfInterference LOIsansGDS;
TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LOI);
-#ifdef OCCT_DEBUG
- if (TRC) cout<<endl<<"FDS_LOIinfsup E"<<EIX<<" tki"<<endl;
- if (TRC) tki.DumpTKIIterator("","\n");
- if (TRC) debredpvg(EIX);
-#endif
for(tki.Init();tki.More();tki.Next()) {
TopOpeBRepDS_Kind K; Standard_Integer G; tki.Value(K,G);
Standard_Boolean mk = (K == KDS); Standard_Boolean mg = (G == GDS);
Standard_Boolean mkg = (mk && mg); if ( mkg ) continue;
-#ifdef OCCT_DEBUG
- if (TRC) {tki.DumpTKI(K,G,"","\n");debredpvg(EIX);}
-#endif
-
TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G);
-#ifdef OCCT_DEBUG
-// Standard_Integer nloi = loi.Extent();
-#endif
+
for (TopOpeBRepDS_ListIteratorOfListOfInterference it(loi);it.More();it.Next()) {
const Handle(TopOpeBRepDS_Interference)& I = it.Value();
TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1;
}
}
-#ifdef OCCT_DEBUG
- if (TRC) cout<<endl<<"FDS_LOIinfsup.2 E"<<EIX<<" : "<<LOIsansGDS.Extent()<<endl;
- if (TRC) debredpvg(EIX);
-#endif
-
n = LOIsansGDS.Extent();
if (n == 0) return Standard_True;
const TopoDS_Shape& F = BDS.Shape(I);
if (F. ShapeType() != TopAbs_FACE) continue;
const TopOpeBRepDS_ListOfInterference& LI = BDS.ShapeInterferences(F);
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(I);
- if (trc) debgb1(I);
-#endif
-
TopOpeBRepDS_ListOfInterference LGb1; // LI = LII + LGb1 (= {FEI with GB1})
TopOpeBRepDS_ListOfInterference LII; FDS_copy(LI,LII);
TopOpeBRepDS_ListIteratorOfListOfInterference it(LII);
if (!ok) {it.Next(); continue;}
if (conf == DIFFORIENTED) newO = TopAbs::Complement(newO);
}
-#ifdef OCCT_DEBUG
- if (trc) {cout<<"**FUN_ds_FEIGb1TO0 : IGb1";IGb1->Dump(cout);cout<<" ->";}
-#endif
newT.Set(newO);
IGb1->SetGeometry(Gsd); IGb1->SetGBound(Standard_False); IGb1->Transition(newT);
-#ifdef OCCT_DEBUG
- if (trc) {IGb1->Dump(cout);cout<<endl;}
-#endif
LGb0.Append(IGb1); LGb1.Remove(it);
}//it(LGb1)
Standard_EXPORT void FDS_assign(const TopTools_ListOfShape& LI, TopTools_ListOfShape& LII);
Standard_EXPORT void FUN_ds_samRk(const TopOpeBRepDS_DataStructure& BDS, const Standard_Integer Rk,
TopTools_ListOfShape& LI, TopTools_ListOfShape & LIsrk);
-Standard_EXPORT void FDS_dumpLI(const TopOpeBRepDS_ListOfInterference& LI,const char* str=NULL);
Standard_EXPORT void FDS_data(const Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_Kind& GT1,Standard_Integer& G1,TopOpeBRepDS_Kind& ST1,Standard_Integer& S1);
Standard_EXPORT Standard_Boolean FDS_data(const TopOpeBRepDS_ListIteratorOfListOfInterference& it,Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_Kind& GT1,Standard_Integer& G1,TopOpeBRepDS_Kind& ST1,Standard_Integer& S1);
Standard_EXPORT void FDS_Tdata(const Handle(TopOpeBRepDS_Interference)& I,TopAbs_ShapeEnum& SB,Standard_Integer& IB,TopAbs_ShapeEnum& SA,Standard_Integer& IA);
static void FUN_Raise()
{
Standard_ProgramError::Raise("Edge3dInterferenceTool");
-#ifdef OCCT_DEBUG
- cout <<" ************** Failure in Edge3dInterferenceTool"<<endl;
-#endif
}
#define POINT (0)
Standard_Real tol1 = BRep_Tool::Tolerance(OOE);
Standard_Real tol2 = tol1*1.e3;
Standard_Real tol = tol2; if (tol > 1.e-2) tol = 1.e-2;
-#ifdef OCCT_DEBUG
- cout<<"$$$$$$$$$$$$$$$$$$$$$$$$ FUN_paronOOE : dist "<<dist<<" tol1 "<<tol1<<endl;
- cout<<"$$$$$$$$$$$$$$$$$$$$$$$$ FUN_paronOOE : dist "<<dist<<" tol "<<tol<<endl;
-#endif
if (ok) ok = (dist <= tol);
}
return ok;
#include <TopOpeBRepDS_Point.hxx>
#include <TopOpeBRepTool_ShapeTool.hxx>
-#ifdef OCCT_DEBUG
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePEI();
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_EdgeInterferenceTool
//purpose :
else if ( I->IsKind(STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference)) )
p = Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(I)->Parameter();
else {
-#ifdef OCCT_DEBUG
- cout<<"EdgeInterference : mauvais type d'interference"<<endl;
-#endif
Standard_ProgramError::Raise("TopOpeBRepDS_EdgeInterferenceTool1");
}
return p;
}
}
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettracePEI() && !VofE) {
- cout<<"===================== VofE = False"<<endl;
- }
-#endif
if(!VofE)
{
return;
{
myParam = P;
}
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_EdgeVertexInterference::Dump
- (Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"EVI ";
- TopOpeBRepDS_ShapeShapeInterference::Dump(OS);
- OS<<" "<<myParam<<" ";
-#endif
-
- return OS;
-}
Standard_EXPORT Standard_Real Parameter() const;
Standard_EXPORT void Parameter (const Standard_Real P);
-
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
+
#define MDSke TopOpeBRepDS_EDGE
#define MDSkf TopOpeBRepDS_FACE
-#ifdef OCCT_DEBUG
-void debrededg(const Standard_Integer I) {cout<<"+++ debrededg f"<<I<<endl;}
-void debredfac(const Standard_Integer I) {cout<<"+++ debredfac f"<<I<<endl;}
-void FUN_dumploiS(const TopoDS_Shape& SG,const TopOpeBRepDS_ListOfInterference& loi,const TopOpeBRepDS_DataStructure& BDS,TCollection_AsciiString str)
-{
- cout<<str<<" G : "<<BDS.Shape(SG)<<" S : ";
- for(TopOpeBRepDS_ListIteratorOfListOfInterference it(loi);it.More();it.Next()) cout<<it.Value()->Support()<<" ";
- cout<<endl;cout.flush();
-}
-void FUN_dumpmosd(TopOpeBRepDS_MapOfShapeData& mosd,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer F,TCollection_AsciiString str)
-{
- cout<<str<<"GmapS sur ";TopAbs::Print(BDS.Shape(F).ShapeType(),cout);
- cout<<" "<<F<<" : "<<mosd.Extent()<<" (GK EDGE)(SK FACE)"<<endl;
- for(Standard_Integer i=1,n=mosd.Extent();i<=n;i++) {
- FUN_dumploiS(mosd.FindKey(i),mosd.FindFromIndex(i).Interferences(),BDS,str);
- }
-}
-#endif
-
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean FTRCF(const Standard_Integer F) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePFI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(F);
- return (b1 || b2 || b3);
-}
-static Standard_Boolean FTRCE(const Standard_Integer E) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(E);
- return (b1 || b2 || b3);
-}
-#endif
-
Standard_EXPORT Standard_Boolean FUN_Parameters(const gp_Pnt& Pnt,const TopoDS_Shape& F,Standard_Real& u,Standard_Real& v);
Standard_EXPORT Standard_Boolean FUN_edgeofface(const TopoDS_Shape& E,const TopoDS_Shape& F);
}
// --------------------------------------------------------
-static void FDS_DUMPTRANSITION(const Standard_Boolean
-#ifdef OCCT_DEBUG
- TRCF
-#endif
- ,const TCollection_AsciiString&
-#ifdef OCCT_DEBUG
- str
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- iFI
-#endif
- ,TopOpeBRepDS_FaceInterferenceTool&
-#ifdef OCCT_DEBUG
- FITool
-#endif
- )
-{
-#ifdef OCCT_DEBUG
- if (TRCF) {
- cout<<str<<iFI<<endl;
- Handle(TopOpeBRepDS_Interference) IBID = new TopOpeBRepDS_Interference();
- FITool.Transition(IBID);
- IBID->Transition().Dump(cout);cout<<endl;
- }
-#endif
-}
-
-// --------------------------------------------------------
-static void FDS_ADDEDGE
-(const Standard_Boolean
-#ifdef OCCT_DEBUG
- TRCF
-#endif
- ,const TCollection_AsciiString&
-#ifdef OCCT_DEBUG
- str
-#endif
- ,const Standard_Integer
-#ifdef OCCT_DEBUG
- iFI // DEB args
-#endif
+static void FDS_ADDEDGE (const Standard_Boolean
+ , const TCollection_AsciiString&
+ , const Standard_Integer
,TopOpeBRepDS_FaceInterferenceTool& FITool
,const TopoDS_Shape& FI
,const TopoDS_Shape& F
,const Handle(TopOpeBRepDS_Interference)& I
)
{
-#ifdef OCCT_DEBUG
- if (TRCF) {TCollection_AsciiString cr("\n"),s=str+iFI+cr;I->Dump(cout,s,cr);}
-#endif
FITool.Add(FI,F,Ecpx,isEGsp,I);
-#ifdef OCCT_DEBUG
- FDS_DUMPTRANSITION(TRCF,"--> resultat partiel sur face ",iFI,FITool);
-#endif
}
//------------------------------------------------------
const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& )
{
Standard_Boolean TRCF = Standard_False;
-#ifdef OCCT_DEBUG
- Standard_Boolean TRCE = Standard_False;
- TRCE = FTRCE(iEG);if (TRCE) debrededg(iEG);
- TRCF = FTRCF(iFI);if (TRCF) debredfac(iFI);
-#endif
-
TopOpeBRepDS_ListIteratorOfListOfInterference ili(LI); if (!ili.More()) return;
// choix de l'arete Ecpx, lieu de resolution de la transition complexe
// TopOpeBRepDS_Transition T1 = I1->Transition(); TopAbs_Orientation O1 = T1.Orientation(TopAbs_IN); // xpu :090498
// Standard_Boolean revT1 = toreverse && (M_FORWARD(O1) || M_REVERSED(O1)); // xpu :090498
-#ifdef OCCT_DEBUG
-// if ((TRCE || TRCF) && revT1) cout<<"-> REVERSE T"<<endl;
-#endif
// if (revT1) I1->ChangeTransition() = T1.Complement(); //xpu :090498
FITool.Init(FI,Ecpx,isEGsp,I1);
FDS_ADDEDGE(TRCF,"\ninit transition complexe F",iFI,FITool,FI,F1,Ecpx,isEGsp,I1);
// TopOpeBRepDS_Transition T2 = I2->Transition(); TopAbs_Orientation O2 = T2.Orientation(TopAbs_IN); // xpu :090498
// Standard_Boolean revT2 = toreverse && (M_FORWARD(O2) || M_REVERSED(O2)); // xpu :090498
-#ifdef OCCT_DEBUG
-// if ((TRCE || TRCF) && revT2) cout<<"-> REVERSE T"<<endl;
-#endif
// if (revT2) I2->ChangeTransition() = T2.Complement(); //xpu :090498
FDS_ADDEDGE(TRCF,"add transition complexe F",iFI,FITool,FI,F2,Ecpx,isEGsp,I2);
// if (revT2) I2->ChangeTransition() = T2.Complement(); //xpu :090498
}
if (isComplex) {
FITool.Transition(I1);
- FDS_DUMPTRANSITION(TRCF,"--> result transition on face ",iFI,FITool); // DEB
}
it1.Next();
} // it1.More()
TopOpeBRepDS_MapOfShapeData mosd;
FUN_GmapS(LI,BDS,mosd);
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC = FTRCF(iFI);
- if (TRC) FUN_dumpmosd(mosd,BDS,iFI,"");
- if (TRC) debredfac(iFI);
-#endif
-
TopOpeBRepDS_ListOfInterference LIout;
//modified by NIZNHY-PKV Thu Mar 16 09:44:24 2000 f
Standard_Integer i, aN;
Standard_Boolean egissect = BDS.IsSectionEdge(TopoDS::Edge(EG));
Standard_Boolean eghasesd = (! esdeg.IsEmpty());
-#ifdef OCCT_DEBUG
-// Standard_Integer egiref = BDS.SameDomainRef(iEG);
-// Standard_Integer egisref = (iEG == egiref);
-// TopOpeBRepDS_Config egc = BDS.SameDomainOri(iEG);
-#endif
-
TopOpeBRepDS_ListOfInterference& LIEG = mosd.ChangeFromKey(EG).ChangeInterferences();
Standard_Integer nExt = LIEG.Extent();
// LIEG = toutes les interferences dont le Support() est une
// face possedant une interference dont la Geometry() est EG.
-
-#ifdef OCCT_DEBUG
- if (TRC) FUN_dumploiS(EG,LIEG,BDS," ");
-#endif
-
if (nExt == 0) {
continue;
}
(const Standard_Integer SIX,const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& MEsp)
{
TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
-
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC = FTRCF(SIX);
- if (TRC) debredfac(SIX);
-#endif
- // F is the Face, LI is list of interferences to compact
-#ifdef OCCT_DEBUG
-// const TopoDS_Shape& F = BDS.Shape(SIX);
-#endif
TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeShapeInterferences(SIX);
TopOpeBRepDS_ListOfInterference lw, lE, lFE, lFEF, lF; lw.Assign(LI);
-#ifdef OCCT_DEBUG
- Standard_Integer nF, nFE, nFEF, nE;
-#endif
-
::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
::FUN_selectGKinterference(lF,MDSke,lFE);
::FUN_selectSKinterference(lFE,MDSkf,lFEF);
::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
-
-#ifdef OCCT_DEBUG
- nF = lF.Extent();
- nFE = lFE.Extent();
- nFEF = lFEF.Extent();
- nE = lE.Extent();
- if(TRC){
- if(nF||nFE||nFEF||nE){cout<<endl;cout<<"-----------------------"<<endl;}
- if(nF) {cout<<"FACE "<<SIX<<" (FACE) : "<<nF<<endl;FDS_dumpLI(lF," ");}
- if(nFE){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE) : "<<nFE<<endl;FDS_dumpLI(lFE," ");}
- if(nFEF){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE)(SK FACE) : "<<nFEF<<endl;FDS_dumpLI(lFEF," ");}
- if(nE) {cout<<"FACE "<<SIX<<" (EDGE) : "<<nE<<endl;FDS_dumpLI(lE," ");}
- }
-#endif
-
FUN_reduceEDGEgeometry(lFEF,BDS,SIX,MEsp);
-#ifdef OCCT_DEBUG
- nF = lF.Extent();
- nFE = lFE.Extent();
- nFEF = lFEF.Extent();
- nE = lE.Extent();
- if(TRC){
- if(nF||nFE||nFEF||nE)cout<<endl;
- if(nF) {cout<<"FACE "<<SIX<<" (FACE) : "<<nF<<endl;FDS_dumpLI(lF," ");}
- if(nFE){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE) : "<<nFE<<endl;FDS_dumpLI(lFE," ");}
- if(nFEF){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE)(SK FACE) : "<<nFEF<<endl;FDS_dumpLI(lFEF," ");}
- if(nE) {cout<<"FACE "<<SIX<<" (EDGE) : "<<nE<<endl;FDS_dumpLI(lE," ");}
- cout<<"-----------------------"<<endl;
- }
-#endif
-
LI.Clear();
LI.Append(lF);
LI.Append(lFE);
(T,TopOpeBRepDS_FACE,S,TopOpeBRepDS_EDGE,G,GIsBound,C)
{
}
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_FaceEdgeInterference::Dump
-(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"FEI ";
- TopOpeBRepDS_ShapeShapeInterference::Dump(OS);
-#endif
-
- return OS;
-}
//! Create an interference of EDGE <G> on FACE <S>.
Standard_EXPORT TopOpeBRepDS_FaceEdgeInterference(const TopOpeBRepDS_Transition& T, const Standard_Integer S, const Standard_Integer G, const Standard_Boolean GIsBound, const TopOpeBRepDS_Config C);
-
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
-
#include <TopOpeBRepTool_ShapeTool.hxx>
#include <TopOpeBRepTool_TOOL.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean FTRCF(const Standard_Integer F) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePFI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(F);
- return (b1 || b2 || b3);
-}
-//unreferenced function, commented
-/*
-static Standard_Boolean FTRCE(const Standard_Integer E) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(E);
- return (b1 || b2 || b3);
-}*/
-extern void debredfac(const Standard_Integer I);
-#endif
-
static Standard_Boolean STATIC_TOREVERSE = Standard_False; // xpu150498
#define M_FORWARD(ori) (ori == TopAbs_FORWARD)
#define M_REVERSED(ori) (ori == TopAbs_REVERSED)
return ok;
}
-//------------------------------------------------------
-// Unused :
-/*#ifdef OCCT_DEBUG
-static Standard_Boolean FUN_Parameters
-(const Standard_Real& Param,const TopoDS_Shape& E,const TopoDS_Shape& F,Standard_Real& u,Standard_Real& v)
-{
- // Get 2d coordinates of point of param <Param> on <E> of <F>.
- BRepAdaptor_Curve2d curv2d(TopoDS::Edge(E),TopoDS::Face(F));
- gp_Pnt2d p2d;
- curv2d.D0(Param,p2d);
- p2d.Coord(u,v);
- return Standard_True;
-}
-#endif
-*/
-
//------------------------------------------------------
Standard_EXPORT void FUN_ComputeGeomData
(const TopoDS_Shape& F,const gp_Pnt2d& uv,gp_Dir& Norm)
return (GAS.GetType() == GeomAbs_Sphere);
}
-//------------------------------------------------------
-//unreferenced function, commented
-/*#ifdef OCCT_DEBUG
-static void FUN_middleUV(const TopoDS_Shape& F,Standard_Real& u,Standard_Real& v)
-{
- Handle(Geom_Surface) su = TopOpeBRepTool_ShapeTool::BASISSURFACE(TopoDS::Face(F));
- GeomAdaptor_Surface GAS(su);
- u = (GAS.LastUParameter() + GAS.FirstUParameter())*.5;
- v = (GAS.LastVParameter() + GAS.FirstVParameter())*.5;
-}
-#endif*/
-
//------------------------------------------------------
Standard_EXPORT void FUN_ComputeGeomData
(const TopoDS_Shape& F,const gp_Pnt2d& uv,
Handle(TopOpeBRepDS_ShapeShapeInterference) I (Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(Iin)); if (I.IsNull()) return;
const TopoDS_Face& FI = TopoDS::Face(FFI);
const TopoDS_Edge& E = TopoDS::Edge(EE);
-#ifdef OCCT_DEBUG
-// Standard_Integer iFI = myPBDS->Shape(FI);
- // Standard_Boolean TRCFI = FTRCF(iFI);if (TRCFI) debredfac(iFI);
-#endif
-
+
// xpu150498
STATIC_TOREVERSE = Standard_False;
if (EEisnew) {
const TopoDS_Face& FI = TopoDS::Face(FFI);
const TopoDS_Face& FT = TopoDS::Face(FFT);
const TopoDS_Edge& E = TopoDS::Edge(EE);
-#ifdef OCCT_DEBUG
- Standard_Integer iFI =
-#endif
- myPBDS->Shape(FI);
+ myPBDS->Shape(FI);
// myPBDS->Shape(FT);
-
-#ifdef OCCT_DEBUG
- Standard_Boolean TRCFI = FTRCF(iFI);if (TRCFI) debredfac(iFI);
-#endif
-
if (!E.IsSame(myEdge)) {FUN_RaiseError();return;}
if (!myrefdef) {
Init(FI,E,EEisnew,I); // premiere interference sur face orientee : Init
return;
}
-
-#ifdef OCCT_DEBUG
-// TopAbs_Orientation FTori = FT.Orientation();
-#endif
TopOpeBRepDS_Kind GT,ST; Standard_Integer G,S; FDS_data(I,GT,G,ST,S);
-#ifdef OCCT_DEBUG
-// Standard_Boolean gisb = I->GBound();
-#endif
const TopoDS_Edge& EG = TopoDS::Edge(myPBDS->Shape(G));
-#ifdef OCCT_DEBUG
-// Standard_Boolean ghassd3d =
-#endif
- FDS_HasSameDomain3d(*myPBDS,EG);
-#ifdef OCCT_DEBUG
-// Standard_Integer gr = myPBDS->SameDomainRef(G);
-// const TopoDS_Edge& ER = TopoDS::Edge(myPBDS->Shape(gr));
-// Standard_Integer gisr = (G == gr);
-#endif
+ FDS_HasSameDomain3d(*myPBDS,EG);
Standard_Boolean same = !STATIC_TOREVERSE; // xpu150498
TopAbs_Orientation oriloc = I->Transition().Orientation(TopAbs_IN);
#include <TopOpeBRepDS_ListIteratorOfListOfInterference.hxx>
#include <TopOpeBRepDS_ListOfInterference.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-//unreferenced function, commented
-/*static Standard_Boolean TRCE(const Standard_Integer EIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(EIX);
- return (b1 || b2 || b3);
-}*/
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_Filter
//purpose :
#include <TopOpeBRepDS_ListOfInterference.hxx>
#include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettracePCI();
-static Standard_Boolean TRCC() {
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettracePCI();
- return (b2 || b3);
-}
-#endif
-
//=======================================================================
//function : ProcessCurveInterferences
//purpose :
// do NOT delete CPIREV!!
Standard_Boolean remove = (GT2 == GT1) && (G2 == G1) && (O1 == O2);
if ( remove ) {
-#ifdef OCCT_DEBUG
- if ( TRCC() ){
- cout<<"remove ";I2->Dump(cout);cout<<" from C "<<CIX<<endl;
- }
-#endif
LI.Remove(it2);
}
else it2.Next();
#include <TopOpeBRepDS_ListOfInterference.hxx>
#include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-extern Standard_Boolean TopOpeBRepDS_GettraceEDPR();
-static Standard_Boolean TRCE(const Standard_Integer SIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(SIX);
- return (b1 || b2 || b3);
-}
-Standard_EXPORT void debfilterPEI(const Standard_Integer i){cout<<endl<<"++ debfilterPEI e"<<i<<endl;}
-Standard_EXPORT void debfilter(const Standard_Integer i) {cout<<endl<<"++ debfilter e"<<i<<endl;}
-#endif
-
Standard_EXPORT Standard_Integer FUN_unkeepEinterferences(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
Standard_EXPORT void FUN_unkeepEsymetrictransitions(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
Standard_EXPORT void FUN_orderFFsamedomain(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& BDS,const Standard_Integer SIX);
(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SIX)
{
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
-
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
- if (TRC) debfilter(SIX);
- if (TRC) cout<<"FUN_FilterEdge on "<<SIX<<" nI = "<<LI.Extent()<<endl;
-#endif
FUN_orderFFsamedomain(LI,HDS,SIX);
FUN_orderSTATETRANS(LI,HDS,SIX);
FUN_unkeepEinterferences(LI,BDS,SIX);
FUN_reducedoublons(LI,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"FUN_FilterEdge on "<<SIX<<" returns nI = "<<LI.Extent()<<endl;
-#endif
-
}
//=======================================================================
(const Standard_Integer SIX)
{
TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
-
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);if (TRC) debfilterPEI(SIX);
-#endif
-
// BDS.Shape(SIX);
TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeShapeInterferences(SIX);
TopOpeBRepDS_ListOfInterference lw, lE, lF, lUU, lall; lall.Assign(LI);
// I = (T(Ftrasha),G,Ftrasha), Ftrasha sdm with FancestorofEIX
FUN_purgeDSonSE(myHDS,SIX,lall);
// xpu : 270398 (pro1260, edge 49,ftrasha 93)
-
-#ifdef OCCT_DEBUG
- //Standard_Integer nUU =
-#endif
- ::FUN_selectTRAUNKinterference(lall,lUU);
+ ::FUN_selectTRAUNKinterference(lall,lUU);
FUN_resolveEUNKNOWN(lUU,BDS,SIX);
lw.Append(lall);
lw.Append(lUU);
-
-#ifdef OCCT_DEBUG
- Standard_Integer nF =
-#endif
- ::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
-#ifdef OCCT_DEBUG
- Standard_Integer nE =
-#endif
- ::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
-
-#ifdef OCCT_DEBUG
- if(TRC){
- if(nE||nF){cout<<endl;cout<<"-----------------------"<<endl;}
- if(nF){cout<<"EDGE "<<SIX<<" (FACE) : "<<nF<<endl;::FDS_dumpLI(lF," ");}
- if(nE){cout<<"EDGE "<<SIX<<" (EDGE) : "<<nE<<endl;::FDS_dumpLI(lE," ");}
- cout<<"Filter::ProcessEdgeInterferences on "<<SIX;
- cout<<" nlF = "<<nF<<" nlE = "<<nE<<endl;
- }
-#endif
-
-#ifdef OCCT_DEBUG
- if (TRC) cout <<" on lF :"<<endl;
-#endif
+ ::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
+ ::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
::FUN_FilterEdge(lF,myHDS,SIX);
-
-#ifdef OCCT_DEBUG
- if (TRC) cout <<" on lF :"<<endl;
-#endif
// ::FUN_unkeepEsymetrictransitions(lF,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- if (TRC) cout <<" on lE :"<<endl;
-#endif
::FUN_FilterEdge(lE,myHDS,SIX);
LI.Clear();
LI.Append(lF);
LI.Append(lE);
-
-#ifdef OCCT_DEBUG
- if (TRC) {
- cout<<"Filter::ProcessEdgeInterferences on "<<SIX;
- cout<<" returns nlF = "<<nF<<" nlE = "<<nE<<endl;
- }
-#endif
-
} //ProcessEdgeInterferences
#include <TopOpeBRepDS_ListOfShapeOn1State.hxx>
#include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GetcontextNOPFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean TRCF(const Standard_Integer F) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePFI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(F);
- return (b1 || b2 || b3);
-}
-#endif
-
Standard_EXPORT Standard_Integer FUN_unkeepFdoubleGBoundinterferences(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
Standard_EXPORT void FUN_resolveFUNKNOWN
(TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_DataStructure& BDS,
const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& MEsp,
TopOpeBRepTool_PShapeClassifier pClassif);
-#ifdef OCCT_DEBUG
-void debfilfac(const Standard_Integer I) {cout<<"+ + + + debfilfac "<<I<<endl;}
-void debpfi(const Standard_Integer I) {cout<<"+ + + + debpfi "<<I<<endl;}
-#endif
-
-// -------------------------------------------------------
-void FUN_FilterFace
-// -------------------------------------------------------
-#ifdef OCCT_DEBUG
-(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& /*BDS*/,const Standard_Integer SIX)
-#else
-(TopOpeBRepDS_ListOfInterference& ,const TopOpeBRepDS_DataStructure& ,const Standard_Integer )
-#endif
-{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCF(SIX);
- Standard_Integer nI = 0;
- if (TRC) debfilfac(SIX);
-#endif
-
-#ifdef OCCT_DEBUG
- nI = LI.Extent();
- if (TRC) cout <<"before FUN_FilterFace on "<<SIX<<" nI = "<<nI<<endl;
-#endif
-
-// ::FUN_unkeepFdoubleGBoundinterferences(LI,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- nI = LI.Extent();
- if (TRC) cout <<"after unkeepFinterferences nI = "<<nI<<endl;
-#endif
-}
-
//=======================================================================
//function : ProcessFaceInterferences
//purpose :
(const Standard_Integer SIX,const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& MEsp)
{
TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
-
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCF(SIX);
- Standard_Integer nI = 0;
- if (TRC) debpfi(SIX);
-#endif
-
-// BDS.Shape(SIX);
+
+ // BDS.Shape(SIX);
TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeShapeInterferences(SIX);
::FUN_reducedoublons(LI,BDS,SIX);
-#ifdef OCCT_DEBUG
- nI = LI.Extent();
- if (TRC) cout <<"after reducedoublons nI = "<<nI<<endl;
-#endif
-
TopOpeBRepDS_ListOfInterference lw, lE, lFE, lFEF, lF, lUU, lall; lall.Assign(LI);
-#ifdef OCCT_DEBUG
- Standard_Integer nUU =
-#endif
- ::FUN_selectTRAUNKinterference(lall,lUU);
+ ::FUN_selectTRAUNKinterference(lall,lUU);
FUN_resolveFUNKNOWN(lUU,BDS,SIX,MEsp,myPShapeClassif);
lw.Append(lall);
lw.Append(lUU);
-#ifdef OCCT_DEBUG
- Standard_Integer nF, nFE, nFEF, nE;
-#endif
-
::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
::FUN_selectGKinterference(lF,TopOpeBRepDS_EDGE,lFE);
::FUN_selectSKinterference(lFE,TopOpeBRepDS_FACE,lFEF);
::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
-
-#ifdef OCCT_DEBUG
- nF = lF.Extent();
- nFE = lFE.Extent();
- nFEF = lFEF.Extent();
- nE = lE.Extent();
- if(TRC){
- if(nF||nFE||nFEF||nE){cout<<endl;cout<<"-----------------------"<<endl;}
- if(nUU) {cout<<"FACE "<<SIX<<" UNKNOWN : "<<nUU<<endl;FDS_dumpLI(lUU," ");}
- if(nF) {cout<<"FACE "<<SIX<<" (FACE) : "<<nF<<endl;FDS_dumpLI(lF," ");}
- if(nFE){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE) : "<<nFE<<endl;FDS_dumpLI(lFE," ");}
- if(nFEF){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE)(SK FACE) : "<<nFEF<<endl;FDS_dumpLI(lFEF," ");}
- if(nE) {cout<<"FACE "<<SIX<<" (EDGE) : "<<nE<<endl;FDS_dumpLI(lE," ");}
- }
-#endif
-
- ::FUN_FilterFace(lFEF,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- nF = lF.Extent();
- nFE = lFE.Extent();
- nFEF = lFEF.Extent();
- nE = lE.Extent();
- if(TRC){
- if(nF||nFE||nFEF||nE)cout<<endl;
- if(nF) {cout<<"FACE "<<SIX<<" (FACE) : "<<nF<<endl;FDS_dumpLI(lF," ");}
- if(nFE){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE) : "<<nFE<<endl;FDS_dumpLI(lFE," ");}
- if(nFEF){cout<<"FACE "<<SIX<<" (FACE)(GK EDGE)(SK FACE) : "<<nFEF<<endl;FDS_dumpLI(lFEF," ");}
- if(nE) {cout<<"FACE "<<SIX<<" (EDGE) : "<<nE<<endl;FDS_dumpLI(lE," ");}
- cout<<"-----------------------"<<endl;
- }
-#endif
LI.Clear();
LI.Append(lF);
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopOpeBRepDS_CurvePointInterference.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceGAP();
-extern Standard_Boolean TopOpeBRepDS_GetcontextNOGAP();
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_GapFiller
//purpose :
void TopOpeBRepDS_GapFiller::Perform()
{
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GetcontextNOGAP () != 0) return;
-#endif
-
myGapTool->Init(myHDS);
TColStd_MapOfInteger View;
//------------------------------------------------------------
if (myAsso->HasAssociation(itSI.Value())) return;
}
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() == 1) {
- cout<<endl;
- cout<<"-----------------------------------------------------"<<endl;
- cout<<" Association Point "<<I->Geometry()<<endl;
- }
-#endif
-
//------------------------------------------------------------------------
// PREMIERE PASSE : Recherche de l association parmi les points qui sont:
// - sur la meme arete
if (!LI.IsEmpty()) {
LI.Append(I);
}
-
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() != 0) {
- TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
- for (it.Initialize(LI); it.More(); it.Next()) {
- cout<<" "<<it.Value()->Geometry();
- }
- cout<<endl;
- }
-#endif
- }
+}
//=======================================================================
LI.Clear();
if (!ISol.IsNull()) {
LI.Append(ISol);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() == 1){
- cout << " Distance Minimum :"<<DistMin<<endl;
- }
-#endif
}
}
-//=======================================================================
-//function : BuildNewPoint
-//purpose :
-//=======================================================================
-//unreferenced function, commented
-/*
-#ifdef OCCT_DEBUG
-static void BuildNewPoint (const TColgp_SequenceOfPnt& LP,
- const Standard_Real& TolMax,
- TopOpeBRepDS_Point& Point)
-{
- if (LP.IsEmpty()) return;
- Standard_Real xp = 0.,yp = 0.,zp = 0.;
-
- Standard_Integer i,Nb = LP.Length();
- for (i = 1; i <= Nb; i++) {
- const gp_Pnt& CP = LP(i);
- xp+= CP.X();yp+=CP.Y();zp+=CP.Z();
- }
- xp/=Nb;yp/=Nb;zp/=Nb;
- gp_Pnt NP(xp,yp,zp);
-
- Standard_Real DistMax = 0;
- for (i = 1; i <= Nb; i++) {
- const gp_Pnt& CP = LP(i);
- DistMax = Max(CP.Distance(NP),DistMax);
- }
- Point.ChangePoint() = NP;
- Point.Tolerance(DistMax+TolMax);
-}
-#endif
-*/
//=======================================================================
//function : ReBuildGeom
//purpose :
TopOpeBRepDS_ListOfInterference& LI = myAsso->Associated(I);
TopOpeBRepDS_ListIteratorOfListOfInterference it(LI);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() == 1) {
- cout <<"Points ";
- for (it.Initialize(LI); it.More(); it.Next()) {
- cout <<" "<<it.Value()->Geometry();
- }
- cout <<endl<<" ---->";
- }
-#endif
-
Standard_Real TolMax = 0,UMin = Precision::Infinite();
Standard_Real UMax = -UMin, U;
TopoDS_Edge E,CE ;
}
myGapTool->EdgeSupport(it.Value(),CE);
if (!CE.IsSame(E)) {
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() == 1){
- cout <<"GapFiller : points pas sur la meme edge -> cas non traite"<<endl;
- }
-#endif
return;
}
}
// Mise a jour.
Standard_Integer IP = myHDS->ChangeDS().AddPoint(P);
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP() == 1) {
- cout <<" New Point : "<<IP<<endl;
- }
-#endif
for (it.Initialize(LI); it.More(); it.Next()) {
View.Add(it.Value()->Geometry());
myGapTool->SetParameterOnEdge(it.Value(),E,U);
IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_GapTool,MMgt_TShared)
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceGAP();
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_GapTool
//purpose :
}
}
}
-#ifdef OCCT_DEBUG
- if (TopOpeBRepDS_GettraceGAP()) {
- cout <<"TopOpeBRepDS_GapTool::Curve Point "<<I->Geometry()<<" -> Pas sur Courbe "<<endl;
- }
-#endif
return 0;
}
IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_HDataStructure,MMgt_TShared)
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceISTO();
-extern Standard_Boolean TopOpeBRepDS_GettraceEDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSF();
-extern Standard_Boolean TopOpeBRepDS_GettraceDSFD();
-extern Standard_Boolean TopOpeBRepDS_GettraceDEGEN();
-extern Standard_Boolean TopOpeBRepDS_GettracePCI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-
-static Standard_Boolean traceSTORE()
-{
- Standard_Boolean trc = Standard_False;
- trc = trc || TopOpeBRepDS_GettraceEDSF();
- trc = trc || TopOpeBRepDS_GettraceDSF();
- trc = trc || TopOpeBRepDS_GettraceDEGEN();
- trc = trc || TopOpeBRepDS_GettraceISTO();
- return trc;
-}
-#endif
-
static void FUN_HDS_data(const Handle(TopOpeBRepDS_Interference)& I,
TopOpeBRepDS_Kind& GT1,Standard_Integer& G1,
TopOpeBRepDS_Kind& ST1,Standard_Integer& S1)
return found;
}
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettraceSTRANGE();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean TRC(const Standard_Integer SIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettraceSTRANGE();
- Standard_Boolean b2 = TopOpeBRepDS_GettraceSPSX(SIX);
- return (b1 || b2);
-}
-void debstore(const Standard_Integer /*i*/) {}
-#endif
-
//=======================================================================
//function : StoreInterference
//purpose : Append an interference I to a list of interference LI
// Append I to the interf. list connected to I Geometry()
//=======================================================================
void TopOpeBRepDS_HDataStructure::StoreInterference
-(const Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_ListOfInterference& LI,
-#ifdef OCCT_DEBUG
- const TCollection_AsciiString& str)
-#else
- const TCollection_AsciiString& )
-#endif
-{
-#ifdef OCCT_DEBUG
- const TopOpeBRepDS_Transition& T = I->Transition();
-
- TopAbs_ShapeEnum sb = T.ShapeBefore();
- Standard_Integer ib = T.IndexBefore();
- Standard_Boolean bok = Standard_True;
- if (ib != 0) {
- TopAbs_ShapeEnum sbds = myDS.Shape(ib).ShapeType();
- bok = (sbds == sb);
- }
-
- TopAbs_ShapeEnum sa = T.ShapeAfter();
- Standard_Integer ia = T.IndexAfter();
- Standard_Boolean aok = Standard_True;
- if (ia != 0) {
- TopAbs_ShapeEnum sads = myDS.Shape(ia).ShapeType();
- aok = (sads == sa);
- }
-
- TopOpeBRepDS_Kind ks = I->SupportType();
- TopAbs_ShapeEnum ss = TopOpeBRepDS::KindToShape(ks);
- Standard_Integer is = I->Support();
- Standard_Boolean sok = Standard_True;
- if ((is != 0) && (ks >= TopOpeBRepDS_EDGE)) {
- TopAbs_ShapeEnum ssds = myDS.Shape(is).ShapeType();
- sok = (ssds == ss);
- }
-
- if (!aok) {
- if (TRC(ia)) cout<<"HDSstore ia,ib is "<<ia<<","<<ib<<" "<<is<<endl;
- debstore(ia);
- }
- if (!bok ) {
- if (TRC(ib)) cout<<"HDSstore ia,ib is "<<ia<<","<<ib<<" "<<is<<endl;
- debstore(ib);
- }
- if (!sok ) {
- if (TRC(is)) cout<<"HDSstore ia,ib is "<<ia<<","<<ib<<" "<<is<<endl;
- debstore(is);
- }
-#endif
-
+(const Handle(TopOpeBRepDS_Interference)& I,TopOpeBRepDS_ListOfInterference& LI, const TCollection_AsciiString&)
+{
// append I to list LI
LI.Append(I);
-
-#ifdef OCCT_DEBUG
- Standard_Boolean appendtoG = Standard_False;
-#endif
Standard_Integer G = I->Geometry();
// append I to list of interference connected to G = I->Geometry()
break;
case TopOpeBRepDS_SURFACE :
-#ifdef OCCT_DEBUG
- appendtoG = Standard_True;
-#endif
myDS.ChangeSurfaceInterferences(G).Append(I);
break;
case TopOpeBRepDS_CURVE :
-#ifdef OCCT_DEBUG
- appendtoG = Standard_True;
-#endif
myDS.ChangeCurveInterferences(G).Append(I);
break;
default:
break;
}
-
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = ::traceSTORE();
- if (trc) {
- cout<<str<<"append "; I->Dump(cout);
- if (appendtoG) cout<<" and to G"<<G<<" list";
- cout<<endl;
- }
-#endif
}
//=======================================================================
//purpose :
//=======================================================================
void TopOpeBRepDS_HDataStructure::StoreInterference
-(const Handle(TopOpeBRepDS_Interference)& I,const TopoDS_Shape& S,
-#ifdef OCCT_DEBUG
- const TCollection_AsciiString& str)
-#else
- const TCollection_AsciiString& )
-#endif
+(const Handle(TopOpeBRepDS_Interference)& I,const TopoDS_Shape& S, const TCollection_AsciiString&)
{
Standard_Boolean h = myDS.HasShape(S);
if ( !h ) {
Standard_ProgramError::Raise("StoreInterference on shape out of DS");
return;
}
-
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = ::traceSTORE();
- TopOpeBRepDS_Kind ks = TopOpeBRepDS::ShapeToKind(S.ShapeType());
- Standard_Integer is = myDS.Shape(S);
- if (trc) TopOpeBRepDS::Print(ks,is,cout,str," : ");
-#endif
-
StoreInterference(I,myDS.ChangeShapeInterferences(S));
}
void TopOpeBRepDS_HDataStructure::StoreInterference
(const Handle(TopOpeBRepDS_Interference)& I,
- const Standard_Integer IS,
-#ifdef OCCT_DEBUG
- const TCollection_AsciiString& str)
-#else
- const TCollection_AsciiString& )
-#endif
+ const Standard_Integer IS, const TCollection_AsciiString&)
{
Standard_Integer n = myDS.NbShapes();
if ( IS < 1 || IS > n ) {
return;
}
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = ::traceSTORE();
- const TopoDS_Shape& S = Shape(IS);
- TopOpeBRepDS_Kind ks = TopOpeBRepDS::ShapeToKind(S.ShapeType());
- if (trc) TopOpeBRepDS::Print(ks,IS,cout,str," : ");
-#endif
-
StoreInterference(I,myDS.ChangeShapeInterferences(IS));
}
{
return (myGeometryType == I->myGeometryType && myGeometry == I->myGeometry);
}
-
-
-//=======================================================================
-//function : DumpS
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Interference::DumpS(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- TopOpeBRepDS::Print(mySupportType,mySupport,OS,"S=","");
- OS.flush();
-#endif
- return OS;
-}
-
-
-//=======================================================================
-//function : DumpG
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Interference::DumpG(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- TopOpeBRepDS::Print(myGeometryType,myGeometry,OS,"G=","");
-#endif
- return OS;
-}
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_Interference::Dump
-(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- myTransition.Dump(OS); OS<<" "; DumpG(OS); OS<<" on "; DumpS(OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-#ifdef OCCT_DEBUG
-Standard_OStream& TopOpeBRepDS_Interference::Dump
-(Standard_OStream& OS,
- const TCollection_AsciiString& s1,
- const TCollection_AsciiString& s2) const
-{
- OS<<s1;
- Dump(OS);
- OS<<s2;
- OS.flush();
- return OS;
-}
-#else
-Standard_OStream& TopOpeBRepDS_Interference::Dump
-(Standard_OStream& OS,
- const TCollection_AsciiString&,
- const TCollection_AsciiString&) const
-{ return OS; }
-#endif
Standard_EXPORT Standard_Boolean HasSameSupport (const Handle(TopOpeBRepDS_Interference)& Other) const;
Standard_EXPORT Standard_Boolean HasSameGeometry (const Handle(TopOpeBRepDS_Interference)& Other) const;
-
- Standard_EXPORT Standard_OStream& DumpG (Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpS (Standard_OStream& OS) const;
-
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& Dump (Standard_OStream& OS, const TCollection_AsciiString& s1, const TCollection_AsciiString& s2) const;
+
Standard_Real TopOpeBRepDS_PointIterator::Parameter()const
{
-
-#ifdef OCCT_DEBUG
-// cout<<"PointIterator : I = "; Value()->Dump(cout); cout<<endl;
-#endif
-
const Handle(TopOpeBRepDS_Interference)& I = Value();
Handle(Standard_Type) T = I->DynamicType();
if ( T == STANDARD_TYPE(TopOpeBRepDS_CurvePointInterference) ) {
#include <TopOpeBRepDS_connex.hxx>
#include <TopOpeBRepTool_SC.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-extern Standard_Boolean TopOpeBRepDS_GettraceEDPR();
-static Standard_Boolean TRCE(const Standard_Integer SIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(SIX);
- return (b1 || b2 || b3);
-}
-Standard_EXPORT void debredunke(const Standard_Integer i){cout<<"++ debredunke e"<<i<<endl;};
-Standard_EXPORT void debpurse (const Standard_Integer i){cout<<"++ debpurse e"<<i<<endl;};
-#endif
-
#define MDShcpi Handle(TopOpeBRepDS_CurvePointInterference)
#define MAKECPI(IJKLM) (Handle(TopOpeBRepDS_CurvePointInterference)::DownCast(IJKLM))
// EVI rejetee si OUT FACE before et after
// et si le vertex-geometrie de l'interference collisionne avec
// un des vertex de l'arete (E) accedant l'interference (I)
-#ifdef OCCT_DEBUG
- // Standard_Boolean k4I = (((shab == TopAbs_FACE) && (stab == TopAbs_OUT)) &&
-// ((shaa == TopAbs_FACE) && (staa == TopAbs_OUT)));
-#endif
{
TopoDS_Vertex Vf,Vr; TopExp::Vertices(TopoDS::Edge(E),Vf,Vr);
TopTools_ListIteratorOfListOfShape it(DS.ShapeSameDomain(VG));
else if ( Vsd.IsSame(Vr) ) { break; }
}
}
-#ifdef OCCT_DEBUG
-// Standard_Boolean k4 = ! ( k4I && k4C );
-#endif
// res = res && k4;
}
//------------------------------------------------------
(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
-#endif
-
+
const TopoDS_Shape& E = BDS.Shape(SIX);
Standard_Boolean isEd;
isEd = BRep_Tool::Degenerated(TopoDS::Edge(E));
-#ifdef OCCT_DEBUG
- if (TRC) {cout<<"FUN_unkeepEinterferences on "<<SIX<<" nI = "<<LI.Extent()<<endl;}
-#endif
-
if (isEd) {
return LI.Extent();
}
Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
Standard_Boolean k1 = ::FUN_keepEinterference(BDS,I1,E);
if ( !k1 ) {
-
-#ifdef OCCT_DEBUG
- if(TRC) {cout<<endl<<"rejet d'interference "<<SIX<<endl;I1->Dump(cout);cout<<endl;}
-#endif
-
LI.Remove(it1);
continue;
}
}
}
Standard_Integer n = LI.Extent();
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"FUN_unkeepEinterferences on "<<SIX<<" returns nI = "<<n<<endl;
-#endif
-
return n;
} // FUN_unkeepEinterferences
//------------------------------------------------------
(TopOpeBRepDS_ListOfInterference& LF,const TopOpeBRepDS_ListOfInterference& LE,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
- if (TRC) cout<<"FUN_changeFOUT on "<<SIX<<" nI = "<<LE.Extent()<<endl;
-#endif
-
const TopoDS_Shape& E = BDS.Shape(SIX);
// reduction du cas OUT(FACE),OUT(FACE) par un vertex si on
}
it1.Next();
}
-#ifdef OCCT_DEBUG
- if (TRC) cout<<" FUN_changeFOUT on "<<SIX<<"returns nI = "<<LE.Extent()<<endl;
-#endif
-
}*/
//------------------------------------------------------
// incidentes en un vertex. (cas d'un shell fait de deux faces partageant une arete.)
(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
-#endif
-
const TopoDS_Shape& E = BDS.Shape(SIX);
Standard_Boolean isEd;
isEd = BRep_Tool::Degenerated(TopoDS::Edge(E));
-#ifdef OCCT_DEBUG
- if (TRC) {
- cout<<"FUN_unkeepEsymetrictransitions on "<<SIX<<" nI = "<<LI.Extent()<<endl;
- ::FDS_dumpLI(LI,"debut : ");
- }
-#endif
-
if (isEd) return;
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
else sym = idshape && !idstate;
if ( sym ) { // les 2 interferences ne different que leurs etats (symetriques)
-#ifdef OCCT_DEBUG
-// cout<<"TopOpeBRepDS FUN_unkeepEsymetrictransitions on edge "<<SIX<<endl;
- if(TRC){
- cout<<"edge "<<SIX<<" : symetrique ";I1->Dump(cout);cout<<endl;
- cout<<" ";I2->Dump(cout);cout<<endl;
- }
-#endif
LI.Remove(it2);
it1toremove = Standard_True;
}
it1.Next();
}
} // it1.More()
-
-#ifdef OCCT_DEBUG
- if(TRC) {
- ::FDS_dumpLI(LI,"apres elim. des sym. : ");
- cout<<"FUN_unkeepEsymetrictransitions on "<<SIX<<" returns nI = "<<LI.Extent()<<endl;
- }
-#endif
}
-#ifdef OCCT_DEBUG
-void deborderFF(const Standard_Integer) {};
-void deborderFF1(const Standard_Integer) {};
-void deborderFF2(const Standard_Integer) {};
-#endif
-
//------------------------------------------------------
Standard_EXPORT void FUN_orderFFsamedomain
//------------------------------------------------------
// L2/ = les autres interfs
// L = L1 + L2;
(TopOpeBRepDS_ListOfInterference& LI,
- const Handle(TopOpeBRepDS_HDataStructure)& HDS,
-#ifdef OCCT_DEBUG
- const Standard_Integer SIX)
-#else
- const Standard_Integer )
-#endif
+ const Handle(TopOpeBRepDS_HDataStructure)& HDS, const Standard_Integer)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
- if (TRC) deborderFF(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
-
TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
TopOpeBRepDS_ListOfInterference LIffsd,LIother;
// BDS.Shape(SIX);
TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1; FDS_Tdata(I1,tsb1,isb1,tsa1,isa1);
// I1->Transition();
-#ifdef OCCT_DEBUG
- if (TRC) deborderFF1(SIX);
-#endif
-
Standard_Boolean ffsd = Standard_False;
if (tsb1 == TopAbs_FACE && tsa1 == TopAbs_FACE) {
// T1 states are defined on FACEs
LI.Clear();
LI.Append(LIffsd);
LI.Append(LIother);
-
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"apres groupage fsd : "); }
-#endif
} // FUN_orderFFsamedomain
-
-#ifdef OCCT_DEBUG
-void deborderSTATETRANS(const Standard_Integer) {};
-#endif
-
//------------------------------------------------------
Standard_EXPORT void FUN_orderSTATETRANSonG
//------------------------------------------------------
// L1/ = interfs dont la transition a des etats egaux
// L2/ = les autres interfs
// L = L1 + L2;
-(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& /*HDS*/,
-#ifdef OCCT_DEBUG
- const Standard_Integer SIX)
-#else
- const Standard_Integer)
-#endif
+(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& /*HDS*/, const Standard_Integer)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
- if (TRC) deborderSTATETRANS(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
-
// TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
TopOpeBRepDS_ListOfInterference L1,L2;
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
LI.Clear();
LI.Append(L1);
LI.Append(L2);
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"apres groupage STATETRANS : "); }
-#endif
} // FUN_orderSTATETRANSonG
//------------------------------------------------------
// L = L1 + L2;
(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
- if (TRC) deborderSTATETRANS(SIX);
-#endif
-
TopOpeBRepDS_TKI tki;
tki.FillOnGeometry(LI);
tki.Init();
//------------------------------------------------------
(TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX); if (TRC) debredunke(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
-
const TopoDS_Shape& E = BDS.Shape(SIX);
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
const TopOpeBRepDS_Transition& T1 = I1->Transition();
Standard_Boolean isunk = T1.IsUnknown();
if (!isunk) continue;
-
-#ifdef OCCT_DEBUG
- modif = Standard_True;
- if(TRC){debredunke(SIX);TCollection_AsciiString s="E";s=s+SIX+" T UNKNOWN ";I1->Dump(cout,s,"\n");}
-#endif
TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1;
FDS_Idata(I1,tsb1,isb1,tsa1,isa1,GT1,G1,ST1,S1);
Standard_Boolean etgf = idt && idi; // edge tangent a une face en 1 point
if (!etgf) continue;
-#ifdef OCCT_DEBUG
- if(TRC){debredunke(SIX);TCollection_AsciiString s="E";s=s+SIX+" etgf ";I1->Dump(cout,s,"\n");}
-#endif
-
Handle(TopOpeBRepDS_CurvePointInterference) cpi = MAKECPI(I1);
if (cpi.IsNull()) continue;
TopOpeBRepDS_Transition& newT1 = I1->ChangeTransition();
newT1.Set(stateb,statea,tsb1,tsa1);
-
-#ifdef OCCT_DEBUG
- if(TRC){debredunke(SIX);TCollection_AsciiString s="E";s=s+SIX+" T corrected ";I1->Dump(cout,s,"\n");}
-#endif
-
}
-
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"apres correction UNKNOWN : "); }
-#endif
-
FUN_unkeepUNKNOWN(LI,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"sans suppression UNKNOWN residuels : "); }
-#endif
}
// ----------------------------------------------------------------------
Standard_EXPORT void FUN_purgeDSonSE(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer EIX,TopOpeBRepDS_ListOfInterference& LI)
// ----------------------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean trc = TopOpeBRepDS_GettraceSPSX(EIX);
- if (trc) {cout<<endl<<"FUN_purgeDSonSE on "<<EIX<<" nI = "<<LI.Extent()<<endl;}
-#endif
-
// recall : (I1,I2) / I1=(T(F),G,S=edge), I2=(T(F),G,S=F) describes a 3d interference
//
// purpose : attached to EIX (section egde SE), I=(T(Fsdm),G,S) /
Standard_Integer rkSE = BDS.AncestorRank(SE);
Standard_Boolean isse = BDS.IsSectionEdge(SE);
if (!isse) return;
-
-#ifdef OCCT_DEBUG
- if (trc) debpurse(EIX);
-#endif
TopTools_MapOfShape fsdmFancSE;
// ---------------
for (tki.Init(); tki.More(); tki.Next()) {
TopOpeBRepDS_Kind Kcur; Standard_Integer Gcur; TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(Kcur,Gcur);
-#ifdef OCCT_DEBUG
-// Standard_Boolean hasfsdmFanc = Standard_False;
-#endif
TopOpeBRepDS_ListIteratorOfListOfInterference it(loi);
// for (; it.More(); it.Next()){
// const Handle(TopOpeBRepDS_Interference)& I = it.Value();
if (isbound) LIface.Append(I);
else newLI.Append(I);
}
-
-#ifdef OCCT_DEBUG
- if (trc)
- for (TopOpeBRepDS_ListIteratorOfListOfInterference itt(LIface); itt.More(); itt.Next())
- {cout<<"rejet d'interference "<<EIX<<" ";itt.Value()->Dump(cout);cout<<endl;}
-#endif
// newLI.Append(loi);
} // tki
LI.Clear();
LI.Append(newLI);
-
-#ifdef OCCT_DEBUG
- if (trc) cout<<"FUN_purgeDSonSE on "<<EIX<<" returns nI = "<<LI.Extent()<<endl;
-#endif
}
#define MDShfei Handle(TopOpeBRepDS_FaceEdgeInterference)
#define MAKEFEI(IJKLM) (Handle(TopOpeBRepDS_FaceEdgeInterference)::DownCast(IJKLM))
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GetcontextNOPFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePFI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean TRCF(const Standard_Integer F) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePFI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(F);
- return (b1 || b2 || b3);
-}
-static void debredunkf(const Standard_Integer /*i*/){};
-#endif
-
Standard_EXPORT Standard_Boolean FUN_Parameters(const gp_Pnt& Pnt,const TopoDS_Shape& F,Standard_Real& u,Standard_Real& v);
Standard_EXPORT Standard_Boolean FUN_Parameters(const Standard_Real& Param,const TopoDS_Shape& E,const TopoDS_Shape& F,Standard_Real& u,Standard_Real& v);
//------------------------------------------------------
Standard_EXPORT void FUN_unkeepFdoubleGBoundinterferences
//------------------------------------------------------
-(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& /*BDS*/,
-#ifdef OCCT_DEBUG
- const Standard_Integer SIX)
-#else
- const Standard_Integer )
-#endif
+(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& /*BDS*/, const Standard_Integer )
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCF(SIX);
-#endif
// BDS.Shape(SIX);
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
isB1 && isB2);
if (cond2) {
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"face "<<SIX<<" : G2 "<< G2 <<" GBound ";I2->Dump(cout);cout<<endl;}
-#endif
cond1 = Standard_True;
LI.Remove(it2);
}
} // it2.More()
if (cond1) {
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"face "<<SIX<<" : G1 "<< G1 <<" GBound ";I1->Dump(cout);cout<<endl;}
-#endif
LI.Remove(it1);
}
else it1.Next();
const TopOpeBRepDS_DataMapOfShapeListOfShapeOn1State& MEsp,
TopOpeBRepTool_PShapeClassifier pClassif)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCF(SIX); if (TRC) debredunkf(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
-
const TopoDS_Shape& F = BDS.Shape(SIX);
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
const TopOpeBRepDS_Transition& T1 = I1->Transition();
Standard_Boolean isunk = T1.IsUnknown();
if (!isunk) continue;
-
-#ifdef OCCT_DEBUG
- modif = Standard_True;
- if(TRC){debredunkf(SIX);TCollection_AsciiString s="F";s=s+SIX+" T UNKNOWN ";I1->Dump(cout,s,"\n");}
-#endif
TopOpeBRepDS_Kind GT1,ST1; Standard_Integer G1,S1; TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1;
FDS_Idata(I1,tsb1,isb1,tsa1,isa1,GT1,G1,ST1,S1);
const TopoDS_Edge& EE = TopoDS::Edge(BDS.Shape(G1));
Standard_Real fE,lE; BRep_Tool::Range(EE,fE,lE);
-
-#ifdef OCCT_DEBUG
- if(TRC){debredunkf(SIX);TCollection_AsciiString s="F";s=s+SIX+" etgf ";I1->Dump(cout,s,"\n");}
-#endif
Handle(TopOpeBRepDS_FaceEdgeInterference) fei = MAKEFEI(I1);
if (fei.IsNull()) continue;
TopAbs_State stmp = stateb; stateb = statea; statea = stmp;
}
newT1.Set(stateb,statea,tsb1,tsa1);
-
-#ifdef OCCT_DEBUG
- if(TRC){debredunkf(SIX);TCollection_AsciiString s="F";s=s+SIX+" T corrected ";I1->Dump(cout,s,"\n");}
-#endif
-
}
-
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"apres correction UNKNOWN : "); }
-#endif
-
FUN_unkeepUNKNOWN(LI,BDS,SIX);
-
-#ifdef OCCT_DEBUG
- if(TRC && modif){ FDS_dumpLI(LI,"sans suppression UNKNOWN residuels : "); }
-#endif
-}
-
-//========================== DEB start
-#ifdef OCCT_DEBUG
-//Standard_IMPORT void FUN_ComputeGeomData(const TopoDS_Shape& F,const Standard_Real& u,const Standard_Real& v,gp_Dir& Norm);
-//------------------------------------------------------
-// Automatic testing for complex faces interference on line with cylinders and planes xpu NYI: general case
-//------------------------------------------------------
-Standard_Boolean TestTransition(const TopOpeBRepDS_Transition& T,const TopoDS_Face& F,const TopoDS_Edge& E,const TopoDS_Solid& So) // DEB only
-{
- TopAbs_State b, a;
- b = T.Before(); a = T.After();
-
- BRepAdaptor_Curve ac(E);
- GeomAbs_CurveType ctyp = ac.GetType();
- // TCollection_AsciiString nt; TestTopOpeDraw_TTOT::CurveToString(ctyp,nt);
- if (ctyp != GeomAbs_Line) {
- // cout << " Case "<<nt;
- cout <<" not treated"<<endl;
- return Standard_True;
- }
- BRepAdaptor_Surface as(F);
- GeomAbs_SurfaceType styp = as.GetType();
- // TestTopOpeDraw_TTOT::CurveToString(styp,nt);
- if (!((styp == GeomAbs_Plane)||(styp == GeomAbs_Cylinder))) {
- // cout << " Case "<<nt;
- cout<<" not treated"<<endl;
- return Standard_True;
- }
- Standard_Real du = TopOpeBRepTool_ShapeTool::Tolerance(E); du *= 5.; // edge tolerance
- Standard_Real u, v, up, vp, p = (ac.FirstParameter() + ac.LastParameter())*.5;
- gp_Pnt pnt, pntnorm; // middle point on edge
- gp_Vec tgt, beafter; // curve tangent vector at pnt
- gp_Dir normS; // normal and direction (Before, After) on reference surface.
-
- ac.D1(p, pnt, tgt);
- Standard_Boolean prodone = FUN_Parameters(pnt, F, u, v); // DEB u, v pntnorm coordinates on F
- if (!prodone){
- cout<<" not treated : prendre un point sur le common des aretes de section SDM"<<endl;
- return Standard_True;
- }
-#ifdef OCCT_DEBUG
-// FUN_ComputeGeomData (F, u, v, normS);
-#endif
- normS = FUN_tool_nggeomF(gp_Pnt2d(u,v), F);
- beafter = normS^gp_Vec(tgt); beafter.Scale(du); // beafter of length du
- pntnorm = gp_Pnt(pnt.XYZ()).Translated(beafter); // (pnt, pntnorm) = du*beafter
- FUN_Parameters(pntnorm, F, up, vp); // DEB up, vp pntnorm coordinates on F
-
- gp_Pnt pAfter, pBefore;
- as.D0(up, vp, pAfter);
- as.D0(up-2*(up-u), vp -2*(vp-v), pBefore);
-
- Standard_Boolean transok;
- TopAbs_State stb, sta;
- BRepClass3d_SolidClassifier classif(So);
-
- classif.Perform(pBefore, Precision::Confusion()); stb = classif.State();
- classif.Perform(pAfter, Precision::Confusion()); sta = classif.State();
- transok = (stb == b)&&(sta == a);
-
- if(!transok) {
- cout<<"States found by classifier :"<<endl;
- cout << "Before :";
- TopAbs::Print(stb, cout);
- cout << "After :";
- TopAbs::Print(sta, cout);
- cout << endl;
- }
-
- return transok;
}
-
-#endif
-//========================== DEB end
-
#include <TopOpeBRepTool_EXPORT.hxx>
#include <TopOpeBRepDS_EXPORT.hxx>
-#ifdef OCCT_DEBUG
-extern Standard_Boolean TopOpeBRepDS_GettracePEI();
-extern Standard_Boolean TopOpeBRepDS_GettracePI();
-extern Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-static Standard_Boolean TRCE(const Standard_Integer EIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(EIX);
- return (b1 || b2 || b3);
-}
-Standard_EXPORT void debredudoub(const Standard_Integer /*i*/) {}
-Standard_EXPORT void debredudoub1(const Standard_Integer /*i*/) {}
-Standard_EXPORT void debredudoub2(const Standard_Integer /*i*/) {}
-Standard_EXPORT void debredunk(const Standard_Integer /*i*/) {}
-#endif
-
//-----------------------------------------------------------------------
Standard_EXPORT Handle(TopOpeBRepDS_Interference) MakeCPVInterference
(const TopOpeBRepDS_Transition& T, // transition
//------------------------------------------------------
(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX)
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX); if (TRC) debredudoub(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
+
const TopoDS_Shape& E = BDS.Shape(SIX);
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
// process interferences of LI with VERTEX geometry
-
it1.Initialize(LI);
while (it1.More() ) {
Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
TopAbs_ShapeEnum tsb1,tsa1; Standard_Integer isb1,isa1;
FDS_Tdata(I1,tsb1,isb1,tsa1,isa1);
-#ifdef OCCT_DEBUG
- if (TRC) debredudoub1(SIX);
-#endif
-
TopOpeBRepDS_ListIteratorOfListOfInterference it2(it1); it2.Next();
while ( it2.More() ) {
TopAbs_ShapeEnum tsb2,tsa2; Standard_Integer isb2,isa2;
FDS_Tdata(I2,tsb2,isb2,tsa2,isa2);
-#ifdef OCCT_DEBUG
- if (TRC) debredudoub2(SIX);
-#endif
-
Standard_Boolean idGS = (GT2 == GT1 && G2 == G1 && ST2 == ST1 && S2 == S1);
if (idGS) {
}
if (idT) {
// les 2 interferences I1 et I2 sont identiques : on supprime I2
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"shape "<<SIX<<" : doublon ";I1->Dump(cout);cout<<endl;}
- modif = Standard_True;
-#endif
LI.Remove(it2);
}
else it2.Next();
}
it1.Next();
} // it1.More()
-
-#ifdef OCCT_DEBUG
- if(TRC && !modif){ FDS_dumpLI(LI,"sans doublon : "); }
-#endif
} // reducedoublons
//------------------------------------------------------
//------------------------------------------------------
(TopOpeBRepDS_ListOfInterference& LI,
TopOpeBRepDS_DataStructure& /*BDS*/,
-#ifdef OCCT_DEBUG
- const Standard_Integer SIX)
-#else
const Standard_Integer)
-#endif
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX); if (TRC) debredunk(SIX);
- Standard_Boolean modif = Standard_False;
-#endif
// BDS.Shape(SIX);
TopOpeBRepDS_ListIteratorOfListOfInterference it1;
Standard_Boolean isunk = T1.IsUnknown();
if (isunk) {
-#ifdef OCCT_DEBUG
- if(TRC) {
- if (isunk) debredunk(SIX);
- cout<<"shape "<<SIX<<" : UNKNOWN transition ";I1->Dump(cout);cout<<endl;
- }
-#endif
LI.Remove(it1);
}
else it1.Next();
} // it1.More()
-
-#ifdef OCCT_DEBUG
- if(TRC && !modif){ FDS_dumpLI(LI,"sans UNKNOWN : "); }
-#endif
} // unkeepUNKNOWN
// -----------------------------------------------------------
l3dFE.Clear();
lFEresi.Clear();
Standard_Integer n3d = 0;
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=TRCE(SIX);
-#endif
-
Standard_Integer nFE = lFE.Extent();
if (nFE <= 1) return n3d;
if (!BDS.HasShape(Eshared))
{Standard_Integer OOrank = BDS.AncestorRank(OOv); BDS.AddShape(Eshared,OOrank);}
S1 = BDS.Shape(Eshared); S2 = S1;
-#ifdef OCCT_DEBUG
- if (TRC) {cout<<" finding out E shared by F"<<IB1<<" and F"<<IB2;
- cout<<" new support is E"<<S1<<endl;}
-#endif
}
if (sameSorsharedEbyTRASHA) { // xpu : 09-03-98
Standard_Boolean sdm = FUN_ds_sdm(BDS,BDS.Shape(SIX),BDS.Shape(S1));
if (sdm) {
-#ifdef OCCT_DEBUG
- if (TRC) cout<<" NO I3d : e"<<SIX<<" same domain with e"<<S1<<endl;
-#endif
it2.Next(); continue;
}
} // xpu : 09-03-98
TColStd_MapOfInteger mapftra;
TopOpeBRepDS_ListOfInterference lIE; FDS_copy(BDS.ShapeInterferences(SIX),lIE);
TopOpeBRepDS_ListOfInterference l3dF;
-#ifdef OCCT_DEBUG
-// Standard_Integer n3d =
-#endif
- FUN_selectSKinterference(lIE,TopOpeBRepDS_FACE,l3dF);
+ FUN_selectSKinterference(lIE,TopOpeBRepDS_FACE,l3dF);
for (TopOpeBRepDS_ListIteratorOfListOfInterference itt(l3dF); itt.More(); itt.Next()) mapftra.Add(itt.Value()->Support());
TopOpeBRepDS_ListOfInterference lII; TopOpeBRepDS_ListIteratorOfListOfInterference it1(lI);
while (it1.More()) {
// I = (T(face),G=POINT/VERTEX,S=EDGE) in <l3dFE>
// <-> I' = (T(face),G=POINT/VERTEX,S=FACE) in <l3dF>
-#ifdef OCCT_DEBUG
-// Standard_Integer n3dFE =
-#endif
- ::FUN_select3dI(SIX,BDS,lFE,lFEresi,l3dFE);
-#ifdef OCCT_DEBUG
-// Standard_Integer n3dFF =
-#endif
- ::FUN_select3dISEsameISF(lFE,l3dFE,l3dFEresi,lF,l3dF);
-#ifdef OCCT_DEBUG
-// Standard_Integer n2dFE =
-#endif
- FUN_select2dI(SIX,BDS,TopAbs_FACE,lFE,l2dFE);
+ ::FUN_select3dI(SIX,BDS,lFE,lFEresi,l3dFE);
+ ::FUN_select3dISEsameISF(lFE,l3dFE,l3dFEresi,lF,l3dF);
+ FUN_select2dI(SIX,BDS,TopAbs_FACE,lFE,l2dFE);
}
void TopOpeBRepDS_ShapeShapeInterference::SetGBound(const Standard_Boolean b)
{ myGBound = b; }
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_ShapeShapeInterference::Dump
- (Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"("; TopOpeBRepDS::Print(myC,OS); OS<<") ";
- if (myGBound) OS<<"(Gb 1) ";
- else OS<<"(Gb 0) ";
- TopOpeBRepDS_Interference::Dump(OS);
-#endif
-
- return OS;
-}
Standard_EXPORT void SetGBound (const Standard_Boolean b);
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
-
TopOpeBRepDS_Interference(T,ST,S,GT,G)
{
}
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_SolidSurfaceInterference::Dump
- (Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"SSI ";TopOpeBRepDS_Interference::Dump(OS);
-#endif
- return OS;
-}
Standard_EXPORT TopOpeBRepDS_SolidSurfaceInterference(const TopOpeBRepDS_Transition& Transition, const TopOpeBRepDS_Kind SupportType, const Standard_Integer Support, const TopOpeBRepDS_Kind GeometryType, const Standard_Integer Geometry);
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
-
IMPLEMENT_STANDARD_RTTIEXT(TopOpeBRepDS_SurfaceCurveInterference,TopOpeBRepDS_Interference)
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_Dumper.hxx>
-#endif
-
//=======================================================================
//function : TopOpeBRepDS_SurfaceCurveInterference
//purpose :
{
myPCurve = PC;
}
-
-
-//=======================================================================
-//function : DumpPCurve
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_SurfaceCurveInterference::DumpPCurve
- (Standard_OStream& OS,
-#ifdef OCCT_DEBUG
- const Standard_Boolean compact
-#else
- const Standard_Boolean
-#endif
- )const
-{
-#ifdef OCCT_DEBUG
- Dump(OS); OS<<endl;
-
- OS<<"PCurve ";
- if (!PCurve().IsNull()) TopOpeBRepDS_Dumper::Print(PCurve(),OS,compact);
- else OS<<" is null";
- OS<<endl;
-#endif
-
- return OS;
-}
-
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-
-Standard_OStream& TopOpeBRepDS_SurfaceCurveInterference::Dump
- (Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"SCI ";TopOpeBRepDS_Dumper::PrintType(myPCurve,OS);OS<<" ";
- TopOpeBRepDS_Interference::Dump(OS);
-#endif
-
- return OS;
-}
Standard_EXPORT void PCurve (const Handle(Geom2d_Curve)& PC);
- Standard_EXPORT Standard_OStream& DumpPCurve (Standard_OStream& OS, const Standard_Boolean compact = Standard_True) const;
-
- Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& OS) const Standard_OVERRIDE;
-
-
DEFINE_STANDARD_RTTIEXT(TopOpeBRepDS_SurfaceCurveInterference,TopOpeBRepDS_Interference)
ChangeInterferences(K,G).Append(HI);
}
-//=======================================================================
-//function : DumpTKI
-//purpose :
-//=======================================================================
-void TopOpeBRepDS_TKI::DumpTKI
-(const TCollection_AsciiString& s1,const TCollection_AsciiString& s2) const
-{
- if (myT.IsNull()) return;
- cout<<s1;
- for (Standard_Integer i=myT->Lower();i<=myT->Upper();i++) {
- TopOpeBRepDS_Kind k = TableIndexToKind(i);
- DumpTKI(k);
- }
- cout<<s2;
- cout.flush();
-}
-
-//=======================================================================
-//function : DumpTKI
-//purpose :
-//=======================================================================
-void TopOpeBRepDS_TKI::DumpTKI
-(const TopOpeBRepDS_Kind K,const TCollection_AsciiString&,const TCollection_AsciiString&) const
-{
- if (myT.IsNull()) return;
- Standard_Integer TI = KindToTableIndex(K);
- const MDSdmoiloi& M = myT->Value(TI);
- for (MDSdmiodmoiloi it(M);it.More();it.Next()) {
- Standard_Integer G = it.Key();
- DumpTKI(K,G,"","\n");
- }
-}
-
-//=======================================================================
-//function : DumpTKI
-//purpose :
-//=======================================================================
-void TopOpeBRepDS_TKI::DumpTKI
-(const TopOpeBRepDS_Kind K,const Standard_Integer G,const TCollection_AsciiString& s1,const TCollection_AsciiString& s2) const
-{
- if (!HasInterferences(K,G)) return;
- const TopOpeBRepDS_ListOfInterference& loi = Interferences(K,G);
- DumpTKI(K,G,loi,s1,s2);
-}
-
-//=======================================================================
-//function : DumpTKI
-//purpose :
-//=======================================================================
-void TopOpeBRepDS_TKI::DumpTKI
-(const TopOpeBRepDS_Kind K,const Standard_Integer G,const TopOpeBRepDS_ListOfInterference& L,const TCollection_AsciiString& s1,const TCollection_AsciiString& s2) const
-{
- if (!HasInterferences(K,G)) return;
- TCollection_AsciiString s;
- if (s1.Length()) s = s1;
- else s = TopOpeBRepDS::SPrint(K,G,"at "," : ");
- TCollection_AsciiString sb(s.Length(),' ');
- Standard_Integer i=0;
- for (TopOpeBRepDS_ListIteratorOfListOfInterference it(L);it.More();it.Next(),i++) {
- if (i) it.Value()->Dump(cout,sb,s2);
- else it.Value()->Dump(cout,s,s2);
- }
-}
-
//=======================================================================
//function : DumpTKIIterator
//purpose :
cout<<s1;
Init();
while (More()) {
- TopOpeBRepDS_Kind K;Standard_Integer G; const TopOpeBRepDS_ListOfInterference& L = Value(K,G);
- DumpTKI(K,G,L,"","\n");
+ TopOpeBRepDS_Kind K;Standard_Integer G;
+ Value(K,G);
Next();
}
cout<<s2;
Standard_EXPORT void Add (const TopOpeBRepDS_Kind K, const Standard_Integer G, const Handle(TopOpeBRepDS_Interference)& HI);
- Standard_EXPORT void DumpTKI (const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = "") const;
-
- Standard_EXPORT void DumpTKI (const TopOpeBRepDS_Kind K, const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = "") const;
-
- Standard_EXPORT void DumpTKI (const TopOpeBRepDS_Kind K, const Standard_Integer G, const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = "") const;
-
- Standard_EXPORT void DumpTKI (const TopOpeBRepDS_Kind K, const Standard_Integer G, const TopOpeBRepDS_ListOfInterference& L, const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = "") const;
-
Standard_EXPORT void DumpTKIIterator (const TCollection_AsciiString& s1 = "", const TCollection_AsciiString& s2 = "");
Standard_EXPORT void Init();
#include <TopOpeBRepTool_EXPORT.hxx>
#include <TopOpeBRepTool_TOOL.hxx>
-static void FUN_Raise()
-{
-#ifdef OCCT_DEBUG
- cout<<"****************************** TopOpeBRepDS_TOOL"<<endl;
-#endif
-}
-
#define M_REVERSED(O) (O == TopAbs_REVERSED)
static void FDS_sortGb(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const TopOpeBRepDS_ListOfInterference& LI, TopOpeBRepDS_ListOfInterference& LIGb0,TopOpeBRepDS_ListOfInterference& LIGb1,TopOpeBRepDS_ListOfInterference& LIGbsd)
TopTools_MapOfShape mapesd;
TopOpeBRepDS_ListOfInterference l1gb0,l1gb1,l1gbsd; FDS_sortGb(HDS,L1d,l1gb0,l1gb1,l1gbsd);
-#ifdef OCCT_DEBUG
-// Standard_Integer ngb0 = l1gb0.Extent();
-// Standard_Integer ngb1 = l1gb1.Extent();
-// Standard_Integer ngbsd = l1gbsd.Extent();
-#endif
-
TopOpeBRepDS_ListIteratorOfListOfInterference it0(l1gb0);
for (; it0.More(); it0.Next()) mapesd.Add(BDS.Shape(it0.Value()->Support()));
Standard_Integer G = I->Geometry();
const TopoDS_Vertex& vG = TopoDS::Vertex(BDS.Shape(G));
TopoDS_Vertex vsd; Standard_Boolean ok = FUN_ds_getoov(vG,BDS,vsd);
- if (!ok) {FUN_Raise(); continue;}
+ if (!ok) continue;
Standard_Boolean Gb1 = Handle(TopOpeBRepDS_ShapeShapeInterference)::DownCast(I)->GBound();
TopoDS_Vertex vE = Gb1 ? vG : vsd;
TopoDS_Vertex vEsd = Gb1 ? vsd : vG;
return (myStateBefore == TopAbs_UNKNOWN) && (myStateAfter == TopAbs_UNKNOWN);
}
-//=======================================================================
-//function : DumpB
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Transition::DumpB(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- TopOpeBRepDS::Print(myStateBefore,OS);
- TopOpeBRepDS::Print(TopOpeBRepDS::ShapeToKind(myShapeBefore),myIndexBefore,OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : DumpA
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Transition::DumpA(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- TopOpeBRepDS::Print(myStateAfter,OS);
- TopOpeBRepDS::Print(TopOpeBRepDS::ShapeToKind(myShapeAfter),myIndexAfter,OS);
-#endif
- return OS;
-}
-
-//=======================================================================
-//function : Dump
-//purpose :
-//=======================================================================
-Standard_OStream& TopOpeBRepDS_Transition::Dump(Standard_OStream& OS) const
-{
-#ifdef OCCT_DEBUG
- OS<<"("; DumpB(OS); OS<<","; DumpA(OS); OS<<")";
-#endif
- return OS;
-}
//! returns True if both states are UNKNOWN
Standard_EXPORT Standard_Boolean IsUnknown() const;
-
- Standard_EXPORT Standard_OStream& DumpA (Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& DumpB (Standard_OStream& OS) const;
-
- Standard_EXPORT Standard_OStream& Dump (Standard_OStream& OS) const;
+
Standard_EXPORT void FDSCNX_FaceEdgeConnexFaces(const TopoDS_Shape& F,const TopoDS_Shape& E,const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopTools_ListOfShape& LF)
{
LF.Clear();
-#ifdef OCCT_DEBUG
-// Standard_Integer Fi =
-#endif
-// HDS->Shape(F);
-#ifdef OCCT_DEBUG
-// Standard_Integer Ei =
-#endif
-// HDS->Shape(E);
-
// verifier que E est une arete de connexite de F
Standard_Boolean EofF = Standard_False;
const TopTools_ListOfShape& loe = FDSCNX_EdgeConnexitySameShape(F,HDS); if (loe.IsEmpty()) return;
const TopTools_ListOfShape& lof = FDSCNX_EdgeConnexitySameShape(E,HDS); if (lof.IsEmpty()) return;
for (TopTools_ListIteratorOfListOfShape it(lof);it.More();it.Next()) {
const TopoDS_Shape& f = it.Value();
-#ifdef OCCT_DEBUG
-// Standard_Integer fi =
-#endif
-// HDS->Shape(f);
Standard_Boolean b = f.IsSame(F);
if (!b) {
LF.Append(f);
if (I<1 || I>ns) return;
Standard_Integer i=I;
const TopoDS_Shape& s=BDS.Shape(i);
-#ifdef OCCT_DEBUG
-// Standard_Integer is=
-#endif
-// BDS.Shape(s);
TopAbs_ShapeEnum ts=s.ShapeType();
const TopTools_ListOfShape& ls=FDSCNX_EdgeConnexitySameShape(s,HDS);
if (ts == TopAbs_EDGE) {
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
for(;ils.More();ils.Next()) {
const TopoDS_Shape& e=ils.Value();
-#ifdef OCCT_DEBUG
-// Standard_Integer ie=BDS.Shape(e);
-// TopAbs_ShapeEnum te=e.ShapeType();
-#endif
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
for(;ilf.More();ilf.Next())cout<<BDS.Shape(ilf.Value())<<" ";
TopTools_ListIteratorOfListOfShape ils(ls);if(!ils.More())return;
for(;ils.More();ils.Next()) {
const TopoDS_Shape& e=ils.Value();Standard_Integer ie=BDS.Shape(e);
-#ifdef OCCT_DEBUG
-// TopAbs_ShapeEnum te=e.ShapeType();
-#endif
TopTools_ListOfShape lf;FDSCNX_FaceEdgeConnexFaces(s,e,HDS,lf);
TopTools_ListIteratorOfListOfShape ilf(lf);if(!ilf.More())continue;
cout<<"clear;";cout<<"tsee f "<<is<<";";
+++ /dev/null
-// Created on: 1998-02-14
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <TopOpeBRepDS_reDEB.hxx>
-#include <TopOpeBRepDS_define.hxx>
-
-#ifdef OCCT_DEBUG
-Standard_EXPORT Standard_Boolean DSREDUEDGETRCE(const Standard_Integer EIX) {
- Standard_Boolean b1 = TopOpeBRepDS_GettracePEI();
- Standard_Boolean b2 = TopOpeBRepDS_GettracePI();
- Standard_Boolean b3 = TopOpeBRepDS_GettraceSPSX(EIX);
- return (b1 || b2 || b3);
-}
-Standard_EXPORT void debreducerE(const Standard_Integer ie)
-{cout<<"+++ debreducerE e"<<ie<<endl;}
-Standard_EXPORT void debreducerEP(const Standard_Integer ie,const Standard_Integer ip)
-{cout<<"+++ debreducerPEI e"<<ie<<" P"<<ip<<endl;}
-Standard_EXPORT void debreducerEV(const Standard_Integer ie,const Standard_Integer iv)
-{cout<<"+++ debreducerVEI e"<<ie<<" V"<<iv<<endl;}
-Standard_EXPORT void debreducer3d(const Standard_Integer ie)
-{cout<<"+++ debreducer3d e"<<ie<<endl;}
-Standard_EXPORT void debredpvg(const Standard_Integer ie)
-{cout<<"+++ debredpvg e"<<ie<<endl;}
-#endif
+++ /dev/null
-// Created on: 1998-02-14
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef OCCT_DEBUG_HeaderFile
-#define _TopOpeBRepDS_reDEB_HeaderFile
-
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_define.hxx>
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePEI();
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePI();
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer);
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceEDPR();
-Standard_EXPORT Standard_Boolean DSREDUEDGETRCE(const Standard_Integer);
-Standard_EXPORT void debreducerE(const Standard_Integer);
-Standard_EXPORT void debreducerEP(const Standard_Integer);
-Standard_EXPORT void debreducerEV(const Standard_Integer,const Standard_Integer);
-Standard_EXPORT void debreducer3d(const Standard_Integer);
-Standard_EXPORT void debredpvg(const Standard_Integer);
-#endif
-
-#endif
#define MDSdmoiloi TopOpeBRepDS_DataMapOfIntegerListOfInterference
#define MDSdmiodmoiloi TopOpeBRepDS_DataMapIteratorOfDataMapOfIntegerListOfInterference
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_reDEB.hxx>
-extern Standard_Boolean TopOpeBRepDS_GetcontextMKTONREG();
-#endif
-
//------------------------------------------------------
Standard_EXPORT void FDS_repvg2
(const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer EIX,const TopOpeBRepDS_Kind GT,TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_ListOfInterference& RLI)
//------------------------------------------------------
{
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //xpu170898
-#endif
const TopoDS_Edge& E = TopoDS::Edge(BDS.Shape(EIX));
Standard_Boolean isEd = BRep_Tool::Degenerated(E);
if (isEd) return;
-#ifdef OCCT_DEBUG
- if (TRC) cout<<endl<<"repvg1 E"<<EIX<<" <- "<<LI.Extent()<<endl;
- if (TRC) debredpvg(EIX);
-#endif
-
Standard_Boolean ispoint = (GT == TopOpeBRepDS_POINT);
Standard_Boolean isvertex = (GT == TopOpeBRepDS_VERTEX);
Standard_Boolean cond = (G1 == G2); if (!cond) { it2.Next(); continue; }
-#ifdef OCCT_DEBUG
- if (TRC && isvertex && DSREDUEDGETRCE(BDS.Shape(VDS))) debreducerEV(EIX,BDS.Shape(VDS));
-#endif
-
const TopoDS_Edge& E2 = TopoDS::Edge(BDS.Shape(S2));
Standard_Boolean isEd2 = BRep_Tool::Degenerated(E2);
if (isEd2) {it2.Next(); continue;}
memeS = memeS && (nLI == 2);
if (!isComplex && memeS) {
- Standard_Boolean mktone = Standard_False;
-#ifdef OCCT_DEBUG
- // NYI XPU : corriger la sequence suivante (avec mkTonE) qui produit une
- // NYI transition (ON,ON) dans le cas cto 009 B4 pour l'arete 6* / face *21
- // NYI aux PDS 1 et 5, au lieu de (IN,IN).
- mktone = TopOpeBRepDS_GetcontextMKTONREG();
- if (mktone) {
- const TopOpeBRepDS_ListOfInterference& LOI = BDS.ShapeInterferences(E);
- Standard_Real pbef,paft; Standard_Boolean isonper;
- Standard_Real pE = FDS_Parameter(I1);
- Standard_Boolean ok = FDS_LOIinfsup(BDS,E,pE,GT1,G1,LOI,pbef,paft,isonper);
- if (!ok) {it2.Next();continue;}
- Standard_Real pE1; ok = FUN_tool_parE(E,pE,E1,pE1); if (!ok) {it2.Next();continue;}
- gp_Pnt2d uv; ok = FUN_tool_paronEF(E,pE,F1,uv); if (!ok) {it2.Next();continue;}
- Standard_Real factor = 0.789;
- TopOpeBRepTool_makeTransition MKT;
- TopAbs_State stb = TopAbs_UNKNOWN,sta = TopAbs_UNKNOWN;
- ok = MKT.Initialize(E,pbef,paft,pE, F1,uv, factor);
- if (ok) ok = MKT.SetRest(E1,pE1);
- if (ok) ok = MKT.MkTonE(stb,sta);
- if (!ok) {it2.Next();continue;}
- TrmemeS.Before(stb); TrmemeS.After(sta);
- }
-#endif
- if (!mktone) {
- Standard_Real pE = FDS_Parameter(I1);
- Standard_Boolean ok = FDS_stateEwithF2d(BDS,E,pE,GT1,G1,F1,TrmemeS); if (!ok) {it2.Next();continue;}
- }
+ Standard_Real pE = FDS_Parameter(I1);
+ Standard_Boolean ok = FDS_stateEwithF2d(BDS,E,pE,GT1,G1,F1,TrmemeS); if (!ok) {it2.Next();continue;}
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"memeS result ";TrmemeS.Dump(cout);cout<<endl;}
-#endif
LI.Remove(it2);
} // !isComplex && memeS
EITool.Init(E,I1);
if (ispoint) EITool.Add(E,PDS,I1);
else if (isvertex) EITool.Add(E1,VDS,I1);
-#ifdef OCCT_DEBUG
- if (TRC){cout<<endl<<"complex T2d E"<<EIX<<endl;I1->Dump(cout);cout<<endl;}
- if (TRC){cout<<"init ";Handle(TopOpeBRepDS_Interference) IBID = new TopOpeBRepDS_Interference();
- EITool.Transition(IBID);IBID->Transition().Dump(cout);cout<<endl;}
-#endif
} // !isComplex && !memeS
if (isComplex && !memeS) {
-#ifdef OCCT_DEBUG
- if(TRC) I2->Dump(cout,"add ","\n");
-#endif
if (ispoint) EITool.Add(E,PDS,I2);
else if (isvertex) EITool.Add(E2,VDS,I2);
LI.Remove(it2);
-#ifdef OCCT_DEBUG
- if(TRC){cout<<"result ";Handle(TopOpeBRepDS_Interference) IBID = new TopOpeBRepDS_Interference();
- EITool.Transition(IBID);IBID->Transition().Dump(cout);cout<<endl;}
-#endif
} // (isComplex && !memeS)
if (isComplex && memeS) {
it2.Next();
-#ifdef OCCT_DEBUG
-#endif
} // (isComplex && memeS)
} // it2
} // it1
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"repvg2 E"<<EIX<<" -> reste "<<LI.Extent()<<" + reduit "<<RLI.Extent()<<endl<<endl;
-#endif
} // FDS_repvg2
//------------------------------------------------------
//------------------------------------------------------
{
TopOpeBRepDS_TKI tki; tki.FillOnGeometry(LOI);
-#ifdef OCCT_DEBUG
- Standard_Boolean TRC=DSREDUEDGETRCE(EIX);
- TRC = Standard_False; //xpu170898
- if (TRC) cout<<endl<<"repvg E"<<EIX<<" <- "<<LOI.Extent()<<endl;
- if (TRC) tki.DumpTKIIterator("","\n");
- if (TRC) debredpvg(EIX);
-#endif
// xpu211098 : cto904F6 (e10,FTRA1=f14,FTRA2=f17)
MDSdmoiloi mapITRASHA;
/*LOI.Clear();
for (tki.Init(); tki.More(); tki.Next()) {
TopOpeBRepDS_Kind K; Standard_Integer G; tki.Value(K,G);
-#ifdef OCCT_DEBUG
- if (TRC) {tki.DumpTKI(K,G,"","\n");debredpvg(EIX);}
-#endif
TopOpeBRepDS_ListOfInterference& loi = tki.ChangeValue(K,G); TopOpeBRepDS_ListOfInterference Rloi;
Standard_Integer nloi = loi.Extent();
if (nloi == 0) continue;
LOI.Append(loi); RLOI.Append(Rloi);
}
}*/
-
-#ifdef OCCT_DEBUG
- if (TRC) cout<<"repvg E"<<EIX<<" -> reste "<<LOI.Extent()<<" + reduit "<<RLOI.Extent()<<endl<<endl;
-#endif
}
//modified by NIZNHY-PKV Sun Dec 15 17:59:43 2002 t
TopTools_ListIteratorOfListOfShape it(LS1); if (!it.More()) return;
const TopoDS_Shape& sref = it.Value();
-#ifdef OCCT_DEBUG
-// Standard_Integer iref =
-#endif
- HDS->SameDomainReference(sref);
+ HDS->SameDomainReference(sref);
TopOpeBRepDS_Config oref = HDS->SameDomainOrientation(sref);
for (it.Initialize(LS1); it.More(); it.Next() ) {
+++ /dev/null
-// Created on: 1994-03-18
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1994-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifdef OCCT_DEBUG
-
-#include <Standard_Type.hxx>
-
-static Standard_Boolean TopOpeBRepDS_traceBUTO = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceBUTO(const Standard_Boolean b)
-{ TopOpeBRepDS_traceBUTO = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceBUTO()
-{ return TopOpeBRepDS_traceBUTO; }
-
-static Standard_Boolean TopOpeBRepDS_traceTRPE = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceTRPE(const Standard_Boolean b)
-{ TopOpeBRepDS_traceTRPE = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceTRPE()
-{ return TopOpeBRepDS_traceTRPE; }
-
-static Standard_Boolean TopOpeBRepDS_traceEDPR = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceEDPR(const Standard_Boolean b)
-{ TopOpeBRepDS_traceEDPR = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceEDPR()
-{ return TopOpeBRepDS_traceEDPR; }
-
-static Standard_Boolean TopOpeBRepDS_traceISTO = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceISTO(const Standard_Boolean b)
-{ TopOpeBRepDS_traceISTO = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceISTO()
-{ return TopOpeBRepDS_traceISTO; }
-
-static Standard_Boolean TopOpeBRepDS_traceSANTRAN = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceSANTRAN(const Standard_Boolean b)
-{ TopOpeBRepDS_traceSANTRAN = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSANTRAN()
-{ return TopOpeBRepDS_traceSANTRAN; }
-
-static Standard_Boolean TopOpeBRepDS_contextNOPFI = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SetcontextNOPFI(const Standard_Boolean b)
-{ TopOpeBRepDS_contextNOPFI = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GetcontextNOPFI()
-{ return TopOpeBRepDS_contextNOPFI; }
-
-static Standard_Boolean TopOpeBRepDS_contextMKTONREG = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SetcontextMKTONREG(const Standard_Boolean b)
-{ TopOpeBRepDS_contextMKTONREG = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GetcontextMKTONREG()
-{ return TopOpeBRepDS_contextMKTONREG; }
-
-static Standard_Boolean TopOpeBRepDS_contextNOPNC = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SetcontextNOPNC(const Standard_Boolean b)
-{ TopOpeBRepDS_contextNOPNC = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GetcontextNOPNC()
-{ return TopOpeBRepDS_contextNOPNC; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSNC = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSNC(const Standard_Boolean b)
-{ TopOpeBRepDS_traceDSNC = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSNC()
-{ return TopOpeBRepDS_traceDSNC; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSF = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSF(const Standard_Boolean b)
-{ TopOpeBRepDS_traceDSF = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSF()
-{ return TopOpeBRepDS_traceDSF; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSP = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSP(const Standard_Boolean b)
-{ TopOpeBRepDS_traceDSP = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSP()
-{ return TopOpeBRepDS_traceDSP; }
-
-static Standard_Boolean TopOpeBRepDS_traceEDSF = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceEDSF(const Standard_Boolean b)
-{ TopOpeBRepDS_traceEDSF = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceEDSF()
-{ return TopOpeBRepDS_traceEDSF; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSFD = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSFD(const Standard_Boolean b)
-{ TopOpeBRepDS_traceDSFD = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSFD()
-{ return TopOpeBRepDS_traceDSFD; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSFK = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSFK(const Standard_Boolean b) { TopOpeBRepDS_traceDSFK = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSFK() { return TopOpeBRepDS_traceDSFK; }
-
-static Standard_Boolean TopOpeBRepDS_traceDSLT = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDSLT(const Standard_Boolean b) { TopOpeBRepDS_traceDSLT = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDSLT() { return TopOpeBRepDS_traceDSLT; }
-
-static Standard_Boolean TopOpeBRepDS_traceDEGEN = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceDEGEN(const Standard_Boolean b)
-{ TopOpeBRepDS_traceDEGEN = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceDEGEN()
-{ return TopOpeBRepDS_traceDEGEN; }
-
-static Standard_Boolean TopOpeBRepDS_tracePCI = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettracePCI(const Standard_Boolean b) { TopOpeBRepDS_tracePCI = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePCI() { return TopOpeBRepDS_tracePCI; }
-
-static Standard_Boolean TopOpeBRepDS_tracePEI = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettracePEI(const Standard_Boolean b) { TopOpeBRepDS_tracePEI = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePEI() { return TopOpeBRepDS_tracePEI; }
-
-static Standard_Boolean TopOpeBRepDS_tracePFI = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettracePFI(const Standard_Boolean b) { TopOpeBRepDS_tracePFI = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePFI() { return TopOpeBRepDS_tracePFI; }
-
-static Standard_Boolean TopOpeBRepDS_tracePI = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettracePI(const Standard_Boolean b) { TopOpeBRepDS_tracePI = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettracePI() { return TopOpeBRepDS_tracePI; }
-
-static Standard_Boolean TopOpeBRepDS_traceSTRANGE = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceSTRANGE(const Standard_Boolean b) {TopOpeBRepDS_traceSTRANGE = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSTRANGE() { return TopOpeBRepDS_traceSTRANGE; }
-
-static Standard_Boolean TopOpeBRepDS_traceGap = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SettraceGAP(const Standard_Boolean b) {TopOpeBRepDS_traceGap = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceGAP() { return TopOpeBRepDS_traceGap; }
-
-static Standard_Boolean TopOpeBRepDS_contextNOGAP = Standard_False;
-Standard_EXPORT void TopOpeBRepDS_SetcontextNOGAP(const Standard_Boolean b) {TopOpeBRepDS_contextNOGAP = b; }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GetcontextNOGAP(char* str) {
- if (TopOpeBRepDS_contextNOGAP) {
- cout<<"context NOGAP actif"; if (str!=NULL) cout<<str; cout<<endl;
- }
- return TopOpeBRepDS_contextNOGAP;
-}
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GetcontextNOGAP() {
- if (TopOpeBRepDS_contextNOGAP) cout<<"context NOGAP actif"<<endl;
- return TopOpeBRepDS_contextNOGAP;
-}
-
-
-// #ifdef OCCT_DEBUG
-#endif
+++ /dev/null
-// Created on: 1997-10-22
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifdef OCCT_DEBUG
-#include <TopOpeBRepDS_traceDSX.hxx>
-
-//////////////////////////////////////////////////////////////
-
-TopOpeBRepDS_traceDS::TopOpeBRepDS_traceDS()
-{}
-
-void TopOpeBRepDS_traceDS::SetHDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
-{
- myHDS = HDS;
- myne = 0;
- myhe.Nullify();
- Allocate();
-}
-
-void TopOpeBRepDS_traceDS::Allocate()
-{
- Standard_Integer n = Nelem();
- Standard_Boolean all = (myhe.IsNull()) || (n > myne);
- if (all) {
- if (n == 0) n = 1000;
- myhe = new TColStd_HArray1OfBoolean(0,n);
- myhe->Init(Standard_False);
- }
- if (n) myne = n;
-}
-
-Standard_Integer TopOpeBRepDS_traceDS::Nelem() const
-{
- return 0;
-}
-
-const Handle(TopOpeBRepDS_HDataStructure)& TopOpeBRepDS_traceDS::GetHDS() const
-{
- return myHDS;
-}
-
-void TopOpeBRepDS_traceDS::Set(const Standard_Integer ie, const Standard_Boolean b)
-{
- Allocate();
- if (!(ie>=1 && ie<=myne)) return;
- myhe->SetValue(ie,b);
-}
-
-void TopOpeBRepDS_traceDS::Set(const Standard_Boolean b, Standard_Integer na, char** a)
-{
- Allocate();
- Standard_Integer ia;
- if (!na) myhe->Init(b);
- else for (ia=0; ia<na; ia++) Set(atoi(a[ia]),b);
-}
-
-Standard_Boolean TopOpeBRepDS_traceDS::GetI(const Standard_Integer ie) const
-{
- if (myhe.IsNull()) return Standard_False;
- if (!(ie>=1 && ie<=myne)) return Standard_False;
- return myhe->Value(ie);
-}
-
-//////////////////////////////////////////////////////////////
-
-TopOpeBRepDS_traceCURVE::TopOpeBRepDS_traceCURVE(){}
-Standard_Integer TopOpeBRepDS_traceCURVE::Nelem() const
-{
- if (myHDS.IsNull()) return 0;
- else return myHDS->NbCurves();
-}
-
-//////////////////////////////////////////////////////////////
-
-#include <TopExp.hxx>
-#include <TopTools_IndexedMapOfShape.hxx>
-
-TopOpeBRepDS_traceSHAPE::TopOpeBRepDS_traceSHAPE() {myns = 0;}
-void TopOpeBRepDS_traceSHAPE::SetSS(const TopoDS_Shape& s1,const TopoDS_Shape& s2)
-{
- TopTools_IndexedMapOfShape M;
- M.Clear();
- //JMB s1 ou s2 peut etre nul (voir ChFi3d chez lvt)
- if (!s1.IsNull()) {
- TopExp::MapShapes(s1,M);
- }
- Standard_Integer n1 = M.Extent();
- M.Clear();
- if (!s2.IsNull()) {
- TopExp::MapShapes(s2,M);
- }
- Standard_Integer n2 = M.Extent();
- myns = n1+n2;
-}
-
-void TopOpeBRepDS_traceSHAPE::SetSSHDS(const TopoDS_Shape& s1,const TopoDS_Shape& s2,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
-{
- SetSS(s1,s2);
- SetHDS(HDS);
-}
-
-Standard_Integer TopOpeBRepDS_traceSHAPE::Nelem() const
-{
- return myns;
-}
-
-Standard_Integer TopOpeBRepDS_traceSHAPE::Index(const TopoDS_Shape& S) const
-{
- if (myHDS.IsNull()) return 0;
- Standard_Integer i = myHDS->Shape(S);
- return i;
-}
-
-Standard_Boolean TopOpeBRepDS_traceSHAPE::GetS(const TopoDS_Shape& S) const
-{
- if (myHDS.IsNull()) return Standard_False;
- Standard_Integer is = myHDS->Shape(S);
- Standard_Boolean b = GetI(is);
- return b;
-}
-
-//////////////////////////////////////////////////////////////
-static TopOpeBRepDS_traceCURVE VCX;
-Standard_EXPORT void TopOpeBRepDS_SettraceCX(const Standard_Boolean b,Standard_Integer n,char** a) { VCX.Set(b,n,a); }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceCX(const Standard_Integer i) { return VCX.GetI(i); }
-
-//////////////////////////////////////////////////////////////
-static TopOpeBRepDS_traceSHAPE VSPSX;
-static TopOpeBRepDS_traceSHAPE VSPSXX;
-
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX(const Standard_Boolean b,Standard_Integer n,char** a) { VSPSX.Set(b,n,a); }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSX(const Standard_Integer i) { return VSPSX.GetI(i); }
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSX(const TopoDS_Shape& S) { return VSPSX.GetS(S); }
-Standard_EXPORT Standard_Integer TopOpeBRepDS_GetindexSPSX(const TopoDS_Shape& S) { return VSPSX.Index(S); }
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX(const Standard_Integer i,const Standard_Boolean b) { VSPSX.Set(i,b); }
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSXX(const Standard_Boolean b, Standard_Integer n, char** a) { VSPSXX.Set(b,n,a);}
-Standard_EXPORT Standard_Boolean TopOpeBRepDS_GettraceSPSXX(const Standard_Integer i1,const Standard_Integer i2)
-{ Standard_Boolean b1 = VSPSXX.GetI(i1); Standard_Boolean b2 = VSPSXX.GetI(i2); return (b1 && b2); }
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_SS(const TopoDS_Shape& S1,const TopoDS_Shape& S2)
-{ VSPSX.SetSS(S1,S2); VSPSXX.SetSS(S1,S2); }
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_HDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS)
-{ VSPSX.SetHDS(HDS); VSPSXX.SetHDS(HDS); }
-Standard_EXPORT void TopOpeBRepDS_SettraceSPSX_SSHDS
-(const TopoDS_Shape& a,const TopoDS_Shape& b,const Handle(TopOpeBRepDS_HDataStructure)& HDS)
-{ VSPSX.SetSSHDS(a,b,HDS); VSPSXX.SetSSHDS(a,b,HDS); }
-
-#endif
+++ /dev/null
-// Created on: 1997-10-22
-// Created by: Jean Yves LEBEY
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _TopOpeBRepDS_traceDSX_HeaderFile
-#define _TopOpeBRepDS_traceDSX_HeaderFile
-
-#ifdef OCCT_DEBUG
-
-#include <TopOpeBRepDS_define.hxx>
-#include <TColStd_HArray1OfBoolean.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <MMgt_TShared.hxx>
-
-class TopOpeBRepDS_traceDS : public MMgt_TShared {
-public:
- TopOpeBRepDS_traceDS();
- virtual Standard_Integer Nelem() const;
- void SetHDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS);
- const Handle(TopOpeBRepDS_HDataStructure)& GetHDS() const;
- void Set(const Standard_Integer i, const Standard_Boolean b);
- void Set(const Standard_Boolean b, Standard_Integer n, char** a);
- Standard_Boolean GetI(const Standard_Integer i) const;
- void Allocate();
-protected:
- Handle(TopOpeBRepDS_HDataStructure) myHDS;
- Standard_Integer myne; Handle(TColStd_HArray1OfBoolean) myhe;
-};
-
-class TopOpeBRepDS_traceCURVE : public TopOpeBRepDS_traceDS {
-public:
- TopOpeBRepDS_traceCURVE();
- Standard_Integer Nelem() const;
-};
-
-class TopOpeBRepDS_traceSHAPE : public TopOpeBRepDS_traceDS {
-public:
- TopOpeBRepDS_traceSHAPE();
- Standard_Integer Nelem() const;
- void SetSS(const TopoDS_Shape&,const TopoDS_Shape&);
- void SetSSHDS(const TopoDS_Shape&,const TopoDS_Shape&,const Handle(TopOpeBRepDS_HDataStructure)&);
- Standard_Integer Index(const TopoDS_Shape&) const;
- Standard_Boolean GetS(const TopoDS_Shape&) const;
-private:
- Standard_Integer myns;
-};
-
-// #ifdef OCCT_DEBUG
-#endif
-
-// #define _TopOpeBRepDS_traceDSX_HeaderFile
-#endif
TopTools_MapOfShape.hxx
TopTools_MutexForShapeProvider.cxx
TopTools_MutexForShapeProvider.hxx
-TopTools_OrientedShapeMapHasher.cxx
TopTools_OrientedShapeMapHasher.hxx
TopTools_OrientedShapeMapHasher.lxx
TopTools_SequenceOfShape.hxx
-TopTools_ShapeMapHasher.cxx
TopTools_ShapeMapHasher.hxx
TopTools_ShapeMapHasher.lxx
TopTools_ShapeSet.cxx
+++ /dev/null
-// Created on: 1993-01-14
-// Created by: Remi LEQUETTE
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_OrientedShapeMapHasher.hxx>
+++ /dev/null
-// Created on: 1993-01-14
-// Created by: Remi LEQUETTE
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Shape.hxx>
-#include <TopTools_ShapeMapHasher.hxx>
-TopoDS.cxx
TopoDS.hxx
TopoDS.lxx
TopoDS_Builder.cxx
TopoDS_Builder.hxx
TopoDS_Builder.lxx
-TopoDS_Compound.cxx
TopoDS_Compound.hxx
TopoDS_Compound.lxx
-TopoDS_CompSolid.cxx
TopoDS_CompSolid.hxx
TopoDS_CompSolid.lxx
-TopoDS_Edge.cxx
TopoDS_Edge.hxx
TopoDS_Edge.lxx
-TopoDS_Face.cxx
TopoDS_Face.hxx
TopoDS_Face.lxx
TopoDS_FrozenShape.hxx
TopoDS_Shape.cxx
TopoDS_Shape.hxx
TopoDS_Shape.lxx
-TopoDS_Shell.cxx
TopoDS_Shell.hxx
TopoDS_Shell.lxx
-TopoDS_Solid.cxx
TopoDS_Solid.hxx
TopoDS_Solid.lxx
TopoDS_TCompound.cxx
TopoDS_TWire.hxx
TopoDS_TWire.lxx
TopoDS_UnCompatibleShapes.hxx
-TopoDS_Vertex.cxx
TopoDS_Vertex.hxx
TopoDS_Vertex.lxx
-TopoDS_Wire.cxx
TopoDS_Wire.hxx
TopoDS_Wire.lxx
+++ /dev/null
-// Created on: 1994-07-29
-// Created by: Modeling
-// Copyright (c) 1994-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#define No_Standard_TypeMismatch
-
-
-#include <TopoDS.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_CompSolid.hxx>
-#include <TopoDS_Edge.hxx>
-#include <TopoDS_Face.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopoDS_Shell.hxx>
-#include <TopoDS_Solid.hxx>
-#include <TopoDS_Vertex.hxx>
-#include <TopoDS_Wire.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_CompSolid.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Compound.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Edge.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Face.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Shell.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Solid.hxx>
+++ /dev/null
-// Created on: 1991-04-12
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Vertex.hxx>
+++ /dev/null
-// Created on: 1991-04-16
-// Created by: Remi LEQUETTE
-// Copyright (c) 1991-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <TopoDS_Wire.hxx>
math_FunctionSetRoot.cxx
math_FunctionSetRoot.hxx
math_FunctionSetRoot.lxx
-math_FunctionSetWithDerivatives.cxx
math_FunctionSetWithDerivatives.hxx
math_FunctionWithDerivative.cxx
math_FunctionWithDerivative.hxx
math_Matrix.lxx
math_MultipleVarFunction.cxx
math_MultipleVarFunction.hxx
-math_MultipleVarFunctionWithGradient.cxx
math_MultipleVarFunctionWithGradient.hxx
-math_MultipleVarFunctionWithHessian.cxx
math_MultipleVarFunctionWithHessian.hxx
math_NewtonFunctionRoot.cxx
math_NewtonFunctionRoot.hxx
+++ /dev/null
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <math_FunctionSetWithDerivatives.hxx>
-#include <math_Matrix.hxx>
+++ /dev/null
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-2015 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <math_MultipleVarFunctionWithGradient.hxx>
+++ /dev/null
-// Created on: 1996-05-03
-// Created by: Philippe MANGIN
-// Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2015 OPEN CASCADE SAS
-//
-// 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 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.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <math_Matrix.hxx>
-#include <math_MultipleVarFunctionWithHessian.hxx>