diff --git a/src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_Poly.cxx b/src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_Poly.cxx index 06974a24ae..29c102fcd0 100644 --- a/src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_Poly.cxx +++ b/src/ApplicationFramework/TKStd/ShapePersistent/ShapePersistent_Poly.cxx @@ -90,8 +90,7 @@ occ::handle ShapePersistent_Poly::pTriangulation::Import() c { occ::handle aTriangulation; -// Triangulation is not used -#if 1 + // Triangulation is not used if (myNodes && myTriangles) { if (myUVNodes) @@ -102,7 +101,6 @@ occ::handle ShapePersistent_Poly::pTriangulation::Import() c aTriangulation->Deflection(myDeflection); } -#endif return aTriangulation; } diff --git a/src/DataExchange/TKDE/DE/DE_ValidationUtils.hxx b/src/DataExchange/TKDE/DE/DE_ValidationUtils.hxx index 8f5af17444..be45fafdaa 100644 --- a/src/DataExchange/TKDE/DE/DE_ValidationUtils.hxx +++ b/src/DataExchange/TKDE/DE/DE_ValidationUtils.hxx @@ -107,4 +107,4 @@ public: occ::handle& theBuffer); }; -#endif // _DE_ValidationUtils_HeaderFile \ No newline at end of file +#endif // _DE_ValidationUtils_HeaderFile diff --git a/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_TabularData.cxx b/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_TabularData.cxx index 3e45cbdcd0..86364e142e 100644 --- a/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_TabularData.cxx +++ b/src/DataExchange/TKDEIGES/IGESDefs/IGESDefs_TabularData.cxx @@ -112,14 +112,5 @@ occ::handle> IGESDefs_TabularData::DependentValues(c double IGESDefs_TabularData::DependentValue(const int /*variablenum*/, const int /*valuenum*/) const { double val = 0.; -#if 0 - int sum = 0; - for (int i = 1; i < variablenum; i++) - { - sum += theNbValues->Value(i); - } - sum += valuenum; - val = theDependentValues->Value(sum); -#endif return val; } diff --git a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_RenderingProperties.hxx b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_RenderingProperties.hxx index 8c23f25070..d16ad389ef 100644 --- a/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_RenderingProperties.hxx +++ b/src/DataExchange/TKDESTEP/STEPConstruct/STEPConstruct_RenderingProperties.hxx @@ -233,4 +233,4 @@ private: std::pair mySpecularColour; }; -#endif // STEPConstruct_RenderingProperties_HeaderFile \ No newline at end of file +#endif // STEPConstruct_RenderingProperties_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceType.hxx b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceType.hxx index f01c405829..a73f668cb2 100644 --- a/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceType.hxx +++ b/src/DataExchange/TKDESTEP/StepDimTol/StepDimTol_GeometricToleranceType.hxx @@ -35,4 +35,4 @@ enum StepDimTol_GeometricToleranceType StepDimTol_GTTTotalRunoutTolerance }; -#endif // _StepDimTol_GeometricToleranceType_HeaderFile \ No newline at end of file +#endif // _StepDimTol_GeometricToleranceType_HeaderFile diff --git a/src/DataExchange/TKDESTEP/StepFile/step.tab.cxx b/src/DataExchange/TKDESTEP/StepFile/step.tab.cxx index 5aad02e16e..2959b8589e 100644 --- a/src/DataExchange/TKDESTEP/StepFile/step.tab.cxx +++ b/src/DataExchange/TKDESTEP/StepFile/step.tab.cxx @@ -1044,7 +1044,6 @@ const signed char parser::yyr2_[] = {0, 2, 1, 2, 1, 2, 8, 7, 6, 1, 1, 1, 1, 2, 3 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 3, 1, 2, 4, 7, 6, 1, 2, 3, 2, 3, 1, 1, 1, 3, 1, 1, 4, 1, 1}; -#if YYDEBUG || 1 // YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. // First, the terminals, then, starting at \a YYNTOKENS, nonterminals. const char* const parser::yytname_[] = {"\"end of file\"", @@ -1102,7 +1101,6 @@ const char* const parser::yytname_[] = {"\"end of file\"", "entlab", "enttype", YY_NULLPTR}; -#endif #if YYDEBUG const unsigned char parser::yyrline_[] = { diff --git a/src/FoundationClasses/TKMath/BVH/BVH_Builder3d.hxx b/src/FoundationClasses/TKMath/BVH/BVH_Builder3d.hxx index 049cd35200..c97a5009c8 100644 --- a/src/FoundationClasses/TKMath/BVH/BVH_Builder3d.hxx +++ b/src/FoundationClasses/TKMath/BVH/BVH_Builder3d.hxx @@ -18,4 +18,4 @@ typedef BVH_Builder BVH_Builder3d; -#endif // _BVH_Builder3d_Header \ No newline at end of file +#endif // _BVH_Builder3d_Header diff --git a/src/FoundationClasses/TKMath/Bnd/Bnd_Range.cxx b/src/FoundationClasses/TKMath/Bnd/Bnd_Range.cxx index 75bc03f134..eeb19b9305 100644 --- a/src/FoundationClasses/TKMath/Bnd/Bnd_Range.cxx +++ b/src/FoundationClasses/TKMath/Bnd/Bnd_Range.cxx @@ -110,15 +110,6 @@ int Bnd_Range::IsIntersected(const double theVal, const double thePeriod) const return 2; } -#if 0 - // This check is excess because always myFirst <= myLast. - // So, this condition is never satisfied. - if (IsEqual(aVal2, static_cast(aPar2))) - {//aVal2 is an integer number => myLast lies ON the "seam-edge" - return 2; - } -#endif - return 0; } diff --git a/src/FoundationClasses/TKMath/TKMath_pch.hxx b/src/FoundationClasses/TKMath/TKMath_pch.hxx index 1da6e06e44..9d67872508 100644 --- a/src/FoundationClasses/TKMath/TKMath_pch.hxx +++ b/src/FoundationClasses/TKMath/TKMath_pch.hxx @@ -34,4 +34,4 @@ #include -#endif // TKMATH_PCH_H \ No newline at end of file +#endif // TKMATH_PCH_H diff --git a/src/FoundationClasses/TKernel/FSD/FSD_CmpFile.cxx b/src/FoundationClasses/TKernel/FSD/FSD_CmpFile.cxx index c2158dde53..90830b9f8e 100644 --- a/src/FoundationClasses/TKernel/FSD/FSD_CmpFile.cxx +++ b/src/FoundationClasses/TKernel/FSD/FSD_CmpFile.cxx @@ -155,21 +155,6 @@ void FSD_CmpFile::ReadLine(TCollection_AsciiString& buffer) void FSD_CmpFile::WriteExtendedLine(const TCollection_ExtendedString& buffer) { -#if 0 - const char16_t* extBuffer; - int i, c, d; - - extBuffer = buffer.ToExtString(); - - for (i = 0; i < buffer.Length(); i++) { - c = (extBuffer[i] & 0x0000FF00) >> 8; - d = extBuffer[i] & 0x000000FF; - - myStream << (char)c << (char)d; - } - - myStream << (char)0 << "\n"; -#endif const char16_t* extBuffer; int i; diff --git a/src/FoundationClasses/TKernel/NCollection/NCollection_Primes.hxx b/src/FoundationClasses/TKernel/NCollection/NCollection_Primes.hxx index 95b0569bd9..e81c959943 100644 --- a/src/FoundationClasses/TKernel/NCollection/NCollection_Primes.hxx +++ b/src/FoundationClasses/TKernel/NCollection/NCollection_Primes.hxx @@ -35,4 +35,4 @@ namespace NCollection_Primes Standard_EXPORT int NextPrimeForMap(const int theN) noexcept; }; // namespace NCollection_Primes -#endif // _NCollection_Primes_HeaderFile \ No newline at end of file +#endif // _NCollection_Primes_HeaderFile diff --git a/src/FoundationClasses/TKernel/OSD/OSD_FileIterator.cxx b/src/FoundationClasses/TKernel/OSD/OSD_FileIterator.cxx index 63eec0d745..784c1773ca 100644 --- a/src/FoundationClasses/TKernel/OSD/OSD_FileIterator.cxx +++ b/src/FoundationClasses/TKernel/OSD/OSD_FileIterator.cxx @@ -125,61 +125,6 @@ static int strcmp_joker(const char* Mask, const char* Name) return 0; } - #if 0 - // LD : ancienne version. - - #define TRUE 1 - #define FALSE 0 - #define NO_MASK '*' - -static int strcmp_joker(char *fileMask,char *fileName) -{ - char *sauve_fileMask,*sauve_fileName; - int compare_result; - int beginning = 1; // 0 if first character is a joker, otherwise 1 - - while (*fileName) { // Test end of AsciiString - - if (*fileMask == NO_MASK) { - beginning = 0; - - while(*fileMask == NO_MASK) fileMask++; - - if (*fileMask) { - while(*fileName && - *fileName != *fileMask) - fileName++; - - sauve_fileMask = fileMask; // Save strings - sauve_fileName = fileName; - } - else return(0); // fileMask ends with a joker - - } - else { // Compare two characters - compare_result = *fileMask++ - *fileName++; - - if (compare_result != 0) - if (beginning) - return (compare_result); /* 1ere chaine pas de joker au debut */ - else { // Look ahead for same string - fileMask = sauve_fileMask; - fileName = ++sauve_fileName; - while(*fileName && - *fileName != *fileMask) - fileName++; - sauve_fileName = fileName; - } - - } - - } - - while(*fileMask == NO_MASK) fileMask++; - return(*fileMask - *fileName); -} - #endif - // Find next file entry in current directory void OSD_FileIterator::Next() diff --git a/src/FoundationClasses/TKernel/Standard/Standard_Macro.hxx b/src/FoundationClasses/TKernel/Standard/Standard_Macro.hxx index 8c06d8f0e5..e14bfcf620 100644 --- a/src/FoundationClasses/TKernel/Standard/Standard_Macro.hxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_Macro.hxx @@ -45,11 +45,7 @@ //! When a deprecated macro is used, a compile-time warning will be issued. //! Unlike Standard_DEPRECATED which marks functions/classes, this is for deprecating macros //! themselves. -#if 1 // Enabled for 8.0.0 deprecation validation. - #define Standard_MACRO_DEPRECATED(theMsg) Standard_DEPRECATED_WARNING(theMsg) -#else - #define Standard_MACRO_DEPRECATED(theMsg) -#endif +#define Standard_MACRO_DEPRECATED(theMsg) Standard_DEPRECATED_WARNING(theMsg) //! @def Standard_HEADER_DEPRECATED(theMessage) //! Macro for marking header inclusions as deprecated; place near the top of a deprecated header diff --git a/src/FoundationClasses/TKernel/Standard/Standard_Strtod.cxx b/src/FoundationClasses/TKernel/Standard/Standard_Strtod.cxx index fc90ec646d..8b2587a2c2 100644 --- a/src/FoundationClasses/TKernel/Standard/Standard_Strtod.cxx +++ b/src/FoundationClasses/TKernel/Standard/Standard_Strtod.cxx @@ -2182,27 +2182,6 @@ static const double tinytens[] = {1e-16, 1e-32}; #endif #ifdef Need_Hexdig /*{*/ - #if 0 -static unsigned char hexdig[256]; - - static void -htinit(unsigned char *h, unsigned char *s, int inc) -{ - int i, j; - for(i = 0; (j = s[i]) !=0; i++) - h[j] = i + inc; - } - - static void -hexdig_init(void) /* Use of hexdig_init omitted 20121220 to avoid a */ - /* race condition when multiple threads are used. */ -{ - #define USC (unsigned char*) - htinit(hexdig, USC "0123456789", 0x10); - htinit(hexdig, USC "abcdef", 0x10 + 10); - htinit(hexdig, USC "ABCDEF", 0x10 + 10); - } - #else static unsigned char hexdig[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 17, 18, 19, @@ -2214,7 +2193,6 @@ static unsigned char hexdig[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - #endif #endif /* } Need_Hexdig */ #ifdef INFNAN_CHECK @@ -2761,11 +2739,6 @@ pcheck: x = b->x; if (denorm) { - #if 0 - if (nbits == Nbits - 1 - && x[nbits >> kshift] & 1 << (nbits & kmask)) - denorm = 0; /* not currently used */ - #endif } else if (b->wds > k || ((n = nbits & kmask) != 0 && hi0bits(x[k - 1]) < 32 - n)) { diff --git a/src/FoundationClasses/TKernel/TKernel_pch.hxx b/src/FoundationClasses/TKernel/TKernel_pch.hxx index 0e37f5e632..bb06936019 100644 --- a/src/FoundationClasses/TKernel/TKernel_pch.hxx +++ b/src/FoundationClasses/TKernel/TKernel_pch.hxx @@ -77,4 +77,4 @@ #include #include -#endif // TKERNEL_PCH_H \ No newline at end of file +#endif // TKERNEL_PCH_H diff --git a/src/ModelingAlgorithms/TKBO/BOPDS/BOPDS_Pair.hxx b/src/ModelingAlgorithms/TKBO/BOPDS/BOPDS_Pair.hxx index a6c17026c6..cdf53edae9 100644 --- a/src/ModelingAlgorithms/TKBO/BOPDS/BOPDS_Pair.hxx +++ b/src/ModelingAlgorithms/TKBO/BOPDS/BOPDS_Pair.hxx @@ -99,4 +99,4 @@ struct hash }; } // namespace std -#endif // _BOPDS_Pair \ No newline at end of file +#endif // _BOPDS_Pair diff --git a/src/ModelingAlgorithms/TKBO/GTests/BOPTest_Utilities.pxx b/src/ModelingAlgorithms/TKBO/GTests/BOPTest_Utilities.pxx index fc0b9acb0a..53bbbcf914 100644 --- a/src/ModelingAlgorithms/TKBO/GTests/BOPTest_Utilities.pxx +++ b/src/ModelingAlgorithms/TKBO/GTests/BOPTest_Utilities.pxx @@ -977,4 +977,4 @@ protected: std::unique_ptr myPaveFiller; }; -#endif // _BOPTest_Utilities_HeaderFile \ No newline at end of file +#endif // _BOPTest_Utilities_HeaderFile diff --git a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx index 3e72d0bff1..cd5bde9b39 100644 --- a/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepAlgo/BRepAlgo_Loop.cxx @@ -45,11 +45,6 @@ #include // #define OCCT_DEBUG_ALGO -// #define DRAW -#ifdef DRAW - #include - #pragma comment(lib, "TKDraw") -#endif #ifdef OCCT_DEBUG_ALGO bool AffichLoop = true; int NbLoops = 0; @@ -408,13 +403,6 @@ static bool SelectEdge(const TopoDS_Face& F, { return false; } -#ifdef DRAW - if (AffichLoop) - { - DBRep::Set("Selected", NE); - } - -#endif return true; } @@ -557,26 +545,13 @@ void BRepAlgo_Loop::Perform() { std::cout << "NewLoop" << std::endl; NbLoops++; - #ifdef DRAW - Sprintf(name, "FLoop_%d", NbLoops); - DBRep::Set(name, myFace); - int NbEdges = 1; - #endif for (itl.Initialize(myEdges); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); - #ifdef DRAW - Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); - DBRep::Set(name, E); - #endif } for (itl.Initialize(myConstEdges); itl.More(); itl.Next()) { const TopoDS_Edge& E = TopoDS::Edge(itl.Value()); - #ifdef DRAW - Sprintf(name, "EEE_%d_%d", NbLoops, NbEdges++); - DBRep::Set(name, E); - #endif } } #endif @@ -628,27 +603,6 @@ void BRepAlgo_Loop::Perform() StoreInMVE(myFace, E, MVE, YaCouture, myVerticesForSubstitute, myTolConf); } -#ifdef DRAW - if (AffichLoop) - { - std::cout << "NewLoop" << std::endl; - int NbEdges = 1; - NCollection_Map Done; - for (int iV = 1; iV <= MVE.Extent(); iV++) - { - for (itl.Initialize(MVE(iV)); itl.More(); itl.Next()) - { - TopoDS_Edge& E = TopoDS::Edge(itl.Value()); - if (Done.Add(E)) - { - Sprintf(name, "EEC_%d_%d", NbLoops, NbEdges++); - DBRep::Set(name, E); - } - } - } - } -#endif - //----------------------------------------------- // Construction of wires and new faces. //---------------------------------------------- @@ -768,14 +722,6 @@ void BRepAlgo_Loop::Perform() std::cout << "OpenWire is : NW_" << NbLoops << "_" << NbWires << std::endl; } #endif - -#ifdef DRAW - if (AffichLoop) - { - Sprintf(name, "NW_%d_%d", NbLoops, NbWires++); - DBRep::Set(name, NW); - } -#endif } PurgeNewEdges(myCutEdges, UsedEdges); @@ -826,12 +772,6 @@ void BRepAlgo_Loop::CutEdge(const TopoDS_Edge& E, if (SV(1).IsEqual(VF) && SV(2).IsEqual(VL)) { NE.Append(E); -#ifdef DRAW - if (AffichLoop) - { - DBRep::Set("ECOpied", E); - } -#endif return; } } @@ -904,12 +844,6 @@ void BRepAlgo_Loop::CutEdge(const TopoDS_Edge& E, U2 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalV), WE); } B.Range(TopoDS::Edge(NewEdge), U1, U2); -#ifdef DRAW - if (AffichLoop) - { - DBRep::Set("Cut", NewEdge); - } -#endif NE.Append(NewEdge.Oriented(E.Orientation())); } } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_AdvancedEvolved.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_AdvancedEvolved.cxx index 20b7409401..77a203dbfe 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_AdvancedEvolved.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_AdvancedEvolved.cxx @@ -1056,182 +1056,6 @@ void BRepFill_AdvancedEvolved::RemoveExcessSolids(const NCollection_List ellipse cc 0 0 0 0 0 1 30 10 -// Draw[]> mkedge ee cc -// Draw[]> wire ww ee -// Draw[]> polyline tw 0 25 -5 0 -20 10 -// Draw[]> mksweep ww -// Draw[]> addsweep tw -// Draw[]> buildsweep r1 -R -// -// It results in creation of shell with self-interfered face. -// However, "checkshape" does not detect any invalidities. -// -// The algorithm "Evolved" must be improved to process such cases. -// Currently they are not processed and this function is useless. -//======================================================================= -class NormalFunc : public math_MultipleVarFunctionWithGradient -{ -public: - NormalFunc(const Adaptor3d_CurveOnSurface& theCOS) :myCOnS(theCOS) - { - } - - virtual int NbVariables() const override - { - return 1; - } - - virtual bool Value(const math_Vector& X, double& F) override; - virtual bool Gradient(const math_Vector& X, math_Vector& G) override; - virtual bool Values(const math_Vector& theX, - double& theF, - math_Vector& theG) override - { - if (!Value(theX, theF)) - return false; - - if (!Gradient(theX, theG)) - return false; - - return true; - }; - - virtual bool Values(const math_Vector& theX, - double& theF, - math_Vector& theG, - math_Matrix& theH) override - { - if (!Values(theX, theF, theG)) - return false; - - theH(1, 1) = theG(1); - return true; - }; - - double FirstParameter() const - { - return myCOnS.FirstParameter(); - } - - double LastParameter() const - { - return myCOnS.LastParameter(); - } - - gp_Pnt GetPoint(const double theX) - { - const occ::handle &aC = myCOnS.GetCurve(); - const occ::handle &aS = myCOnS.GetSurface(); - const gp_Pnt2d aP2d(aC->Value(theX)); - return aS->Value(aP2d.X(), aP2d.Y()); - } - -protected: - - NormalFunc& operator=(NormalFunc&); - -private: - const Adaptor3d_CurveOnSurface& myCOnS; -}; - -//======================================================================= -//function : Value -//purpose : +aD1v_x^2*aD1u_y^2 + aD1v_x^2*aD1u_z^2 + -// +aD1v_y^2*aD1u_z^2 + aD1u_x^2*aD1v_y^2 + -// +aD1u_x^2*aD1v_z^2 + aD1u_y^2*aD1v_z^2 - -// - 2*(+aD1u_x*aD1v_x*aD1u_y*aD1v_y + -// +aD1u_x*aD1v_x*aD1u_z*aD1v_z + -// +aD1u_y*aD1v_y*aD1u_z*aD1v_z) -//======================================================================= -bool NormalFunc::Value(const math_Vector& theX, double& theF) -{ - const occ::handle &aC = myCOnS.GetCurve(); - const occ::handle &aS = myCOnS.GetSurface(); - - const gp_Pnt2d aP2d(aC->Value(theX(1))); - gp_Pnt aP3d; - gp_Vec aD1u, aD1v; - aS->D1(aP2d.X(), aP2d.Y(), aP3d, aD1u, aD1v); - - theF = aD1u.Crossed(aD1v).SquareMagnitude(); - return true; -} - -//======================================================================= -//function : Gradient -//purpose : -//2 * ((aD1v_x*aD1u_y)*(aD1u_y*(aD2uv_x*aDc_x + aD2v_x*aDc_y) + aD1v_x*(aD2u_y*aDc_x + aD2uv_y*aDc_y)) + -// (aD1v_x*aD1u_z)*(aD1u_z*(aD2uv_x*aDc_x + aD2v_x*aDc_y) + aD1v_x*(aD2u_z*aDc_x + aD2uv_z*aDc_y)) + -// (aD1v_y*aD1u_z)*(aD1u_z*(aD2uv_y*aDc_x + aD2v_y*aDc_y) + aD1v_y*(aD2u_z*aDc_x + aD2uv_z*aDc_y)) + -// (aD1u_x*aD1v_y)*(aD1u_x*(aD2uv_y*aDc_x + aD2v_y*aDc_y) + aD1v_y*(aD2u_x*aDc_x + aD2uv_x*aDc_y)) + -// (aD1u_x*aD1v_z)*(aD1u_x*(aD2uv_z*aDc_x + aD2v_z*aDc_y) + aD1v_z*(aD2u_x*aDc_x + aD2uv_x*aDc_y)) + -// (aD1u_y*aD1v_z)*(aD1u_y*(aD2uv_z*aDc_x + aD2v_z*aDc_y) + aD1v_z*(aD2u_y*aDc_x + aD2uv_y*aDc_y)) - -// -// (aD2u_x*aDc_x + aD2uv_x*aDc_y)*aD1v_x*aD1u_y*aD1v_y - -// aD1u_x*(aD2uv_x*aDc_x + aD2v_x*aDc_y)*aD1u_y*aD1v_y - -// aD1u_x*aD1v_x*(aD2u_y*aDc_x + aD2uv_y*aDc_y)*aD1v_y - -// aD1u_x*aD1v_x*aD1u_y*(aD2uv_y*aDc_x + aD2v_y*aDc_y) - -// -// (aD2u_x*aDc_x + aD2uv_x*aDc_y)*aD1v_x*aD1u_z*aD1v_z - -// aD1u_x*(aD2uv_x*aDc_x + aD2v_x*aDc_y)*aD1u_z*aD1v_z - -// aD1u_x*aD1v_x*(aD2u_z*aDc_x + aD2uv_z*aDc_y)*aD1v_z - -// aD1u_x*aD1v_x*aD1u_z*(aD2uv_z*aDc_x + aD2v_z*aDc_y) - -// -// (aD2u_y*aDc_x + aD2uv_y*aDc_y)*aD1v_y*aD1u_z*aD1v_z - -// aD1u_y*(aD2uv_y*aDc_x + aD2v_y*aDc_y)*aD1u_z*aD1v_z - -// aD1u_y*aD1v_y*(aD2u_z*aDc_x + aD2uv_z*aDc_y)*aD1v_z - -// aD1u_y*aD1v_y*aD1u_z*(aD2uv_z*aDc_x + aD2v_z*aDc_y)) -//======================================================================= -bool NormalFunc::Gradient(const math_Vector& theX, math_Vector& theG) -{ - const occ::handle &aC = myCOnS.GetCurve(); - const occ::handle &aS = myCOnS.GetSurface(); - - gp_Pnt2d aP2d; - gp_Vec2d aDc; - aC->D1(theX(1), aP2d, aDc); - - gp_Pnt aP3d; - gp_Vec aD1u, aD1v, aD2u, aD2v, aD2uv; - aS->D2(aP2d.X(), aP2d.Y(), aP3d, aD1u, aD1v, aD2u, aD2v, aD2uv); - - theG(1) = (aD1v.X()*aD1u.Y())*(aD1u.Y()*(aD2uv.X()*aDc.X() + aD2v.X()*aDc.Y()) + - aD1v.X()*(aD2u.Y()*aDc.X() + aD2uv.Y()*aDc.Y())) + - (aD1v.X()*aD1u.Z())*(aD1u.Z()*(aD2uv.X()*aDc.X() + - aD2v.X()*aDc.Y()) + aD1v.X()*(aD2u.Z()*aDc.X() + aD2uv.Z()*aDc.Y())) + - (aD1v.Y()*aD1u.Z())*(aD1u.Z()*(aD2uv.Y()*aDc.X() + aD2v.Y()*aDc.Y()) + - aD1v.Y()*(aD2u.Z()*aDc.X() + aD2uv.Z()*aDc.Y())) + (aD1u.X()*aD1v.Y())* - (aD1u.X()*(aD2uv.Y()*aDc.X() + aD2v.Y()*aDc.Y()) + aD1v.Y()*(aD2u.X()* - aDc.X() + aD2uv.X()*aDc.Y())) + (aD1u.X()*aD1v.Z())*(aD1u.X()*(aD2uv.Z()* - aDc.X() + aD2v.Z()*aDc.Y()) + aD1v.Z()*(aD2u.X()*aDc.X() + - aD2uv.X()*aDc.Y())) + (aD1u.Y()*aD1v.Z())*(aD1u.Y()*(aD2uv.Z()*aDc.X() + - aD2v.Z()*aDc.Y()) + aD1v.Z()*(aD2u.Y()*aDc.X() + aD2uv.Y()*aDc.Y())) - - (aD2u.X()*aDc.X() + aD2uv.X()*aDc.Y())*aD1v.X()*aD1u.Y()*aD1v.Y() - - aD1u.X()*(aD2uv.X()*aDc.X() + aD2v.X()*aDc.Y())*aD1u.Y()*aD1v.Y() - - aD1u.X()*aD1v.X()*(aD2u.Y()*aDc.X() + aD2uv.Y()*aDc.Y())*aD1v.Y() - - aD1u.X()*aD1v.X()*aD1u.Y()*(aD2uv.Y()*aDc.X() + aD2v.Y()*aDc.Y()) - - (aD2u.X()*aDc.X() + aD2uv.X()*aDc.Y())*aD1v.X()*aD1u.Z()*aD1v.Z() - - aD1u.X()*(aD2uv.X()*aDc.X() + aD2v.X()*aDc.Y())*aD1u.Z()*aD1v.Z() - - aD1u.X()*aD1v.X()*(aD2u.Z()*aDc.X() + aD2uv.Z()*aDc.Y())*aD1v.Z() - - aD1u.X()*aD1v.X()*aD1u.Z()*(aD2uv.Z()*aDc.X() + aD2v.Z()*aDc.Y()) - - (aD2u.Y()*aDc.X() + aD2uv.Y()*aDc.Y())*aD1v.Y()*aD1u.Z()*aD1v.Z() - - aD1u.Y()*(aD2uv.Y()*aDc.X() + aD2v.Y()*aDc.Y())*aD1u.Z()*aD1v.Z() - - aD1u.Y()*aD1v.Y()*(aD2u.Z()*aDc.X() + aD2uv.Z()*aDc.Y())*aD1v.Z() - - aD1u.Y()*aD1v.Y()*aD1u.Z()*(aD2uv.Z()*aDc.X() + aD2v.Z()*aDc.Y()); - - return true; -} - -#endif //======================================================================= // function : RebuildFaces // purpose : Creates a wires from theEdges and puts it to the new face @@ -1359,29 +1183,6 @@ static void InsertEDegenerated(const TopoDS_Face& theFace, aFirstEdge = anE1; anExp.Next(); -#if 0 - if (!anExp.More()) - { - // The wire contains only single edge. - // But this edge can be closed itself (e.g. circle). - - TopoDS_Vertex aVf, aVl; - TopExp::Vertices(anE1, aVf, aVl); - if (!aVf.IsNull() && aVf.IsSame(aVl)) - { - double aF, aL; - const occ::handle aC = BRep_Tool::CurveOnSurface(anE1, theFace, aF, aL); - aF = BRep_Tool::Parameter(aVf, anE1); - aL = BRep_Tool::Parameter(aVl, anE1); - const gp_Pnt2d aPf(aC->Value(aF)), aPl(aC->Value(aL)); - - MakeEdgeDegenerated(aVf, theFace, aPf, aPl, theLEdges); - } - - return; - } -#endif - // Map containing all vertices of degenerated edges NCollection_Map aMapVofDE; @@ -1406,14 +1207,6 @@ static void InsertEDegenerated(const TopoDS_Face& theFace, { const TopoDS_Edge& anE2 = anExp.Current(); aLastEdge = anE2; -#if 0 - if (anE1.IsSame(anE2)) - { - //Exclude a gap between two seam-edges (e.g. cylinder without roofs). - anE1 = anE2; - continue; - } -#endif const TopoDS_Vertex& aVertCurr = anExp.CurrentVertex(); @@ -1499,15 +1292,6 @@ static void InsertEDegenerated(const TopoDS_Face& theFace, if (aFirstEdge.IsNull() || aLastEdge.IsNull()) return; -#if 0 - if (aFirstEdge.IsSame(aLastEdge)) - { - //Exclude a gap between two seam-edges (e.g. cylinder without bottom-base). - - return; - } -#endif - // TopExp::CommonVertex(...) does not work // if edges have more than one pair of common vertex //(e.g. two halves of circle). Here, we process this case. @@ -1708,20 +1492,7 @@ bool BRepFill_AdvancedEvolved::CheckSingularityAndAdd( continue; } - NCollection_List aLE; -#if 0 - // This fragment requires fixing the issue #29656 - NCollection_Map aMM; - TopExp_Explorer anExpEB(aBAB.Shape(), TopAbs_EDGE); - for (; anExpEB.More(); anExpEB.Next()) - { - const TopoDS_Edge anEE = TopoDS::Edge(anExpEB.Current()); - if (!aMM.Add(anEE)) - continue; - - aLE.Append(anEE); - } -#else + NCollection_List aLE; NCollection_List::Iterator aBItr(aLGF); for (; aBItr.More(); aBItr.Next()) { @@ -1740,7 +1511,6 @@ bool BRepFill_AdvancedEvolved::CheckSingularityAndAdd( aLE.Append(anEM); } } -#endif isSplit = true; InsertEDegenerated(aFace, aLE); diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Draft.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Draft.cxx index 7fcc2c41eb..f1c0d4bf47 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Draft.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Draft.cxx @@ -63,14 +63,6 @@ #include #include -#ifdef DRAW - #include - #include - #include - #include -static bool Affich = 0; -#endif - //================================================================================================= static void ComputeTrsf(const TopoDS_Wire& W, const gp_Dir& D, Bnd_Box& Box, gp_Trsf& Tf) @@ -275,12 +267,6 @@ BRepFill_Draft::BRepFill_Draft(const TopoDS_Shape& S, const gp_Dir& Dir, const d if (Vf.IsSame(Vl)) myWire.Closed(true); } -#ifdef DRAW - if (Affich) - { - DBRep::Set("TheWire", myWire); - } -#endif myAngle = std::abs(Angle); myDir = Dir; @@ -409,15 +395,6 @@ void BRepFill_Draft::Perform(const TopoDS_Shape& StopShape, const bool KeepOutSi occ::handle Plan = new (Geom_Plane)(Pt, myDir); Surf = new (Geom_RectangularTrimmedSurface)(Plan, -L, L, -L, L); -#ifdef DRAW - if (Affich) - { - char* Temp = "ThePlan"; - DrawTrSurf::Set(Temp, Surf); - // DrawTrSurf::Set("ThePlan", Surf); - } -#endif - // Sweeping and restriction Init(Plan, L * 1.01, WBox); BuildShell(Surf, false); @@ -467,13 +444,6 @@ void BRepFill_Draft::Init(const occ::handle&, const double Length, occ::handle TC = new (Geom_TrimmedCurve)(L, 0, Length); -#ifdef DRAW - if (Affich > 2) - { - TC = new (Geom_Circle)(gp::XOY(), Length); - } -#endif - BRepLib_MakeEdge ME(TC); TopoDS_Edge EG = ME.Edge(); diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx index 1d959c4893..904cc22671 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Evolved.cxx @@ -96,20 +96,6 @@ #include #include -// #define DRAW -#ifdef DRAW - #include - #include - #include -static bool AffichGeom = false; -static bool AffichEdge = false; -static int NbFACES = 0; -static int NbTRIMFACES = 0; -static int NbVEVOS = 0; -static int NbPROFILS = 0; -static int NbEDGES = 0; -#endif - static double BRepFill_Confusion() { double Tol = 1.e-6; @@ -643,14 +629,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, const GeomAbs_JoinType /*Join*/) { -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "PROFIL_%d", ++NbPROFILS); - DBRep::Set(name, Pr); - } -#endif TopoDS_Shape aLocalShape = Sp.Oriented(TopAbs_FORWARD); mySpine = TopoDS::Face(aLocalShape); // mySpine = TopoDS::Face(Sp.Oriented(TopAbs_FORWARD)); @@ -723,13 +701,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, } } -#ifdef DRAW - if (AffichEdge) - { - std::cout << " End Construction of geometric primitives" << std::endl; - } -#endif - //--------------------------------------------------- // Construction of edges associated to bissectrices. //--------------------------------------------------- @@ -964,14 +935,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, myBuilder.Continuity(CurrentEdge, F[0], F[1], Continuity); -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "ARCEDGE_%d_%d_%d", i, vv, Ti); - DBRep::Set(name, CurrentEdge); - } -#endif //------------------------------------------- // Storage of the edge for each of faces. //------------------------------------------- @@ -1070,13 +1033,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, } } -#ifdef DRAW - if (AffichEdge) - { - std::cout << " End of Construction of edges and vertices on bissectrices" << std::endl; - } -#endif - //---------------------------------- // Construction of parallel edges. //---------------------------------- @@ -1145,15 +1101,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, for (k = 1; k <= aSeqOfShape.Length(); k++) { myMap(CurrentSpine)(VCF).Append(aSeqOfShape.Value(k)); - -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); - DBRep::Set(name, aSeqOfShape.Value(k)); - } -#endif } } } @@ -1189,27 +1136,11 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, for (k = 1; k <= aSeqOfShape.Length(); k++) { myMap(CurrentSpine)(VCL).Append(aSeqOfShape.Value(k)); - -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "PAREDGE_%d_%d", ++NbEDGES, k); - DBRep::Set(name, aSeqOfShape.Value(k)); - } -#endif } } } } -#ifdef DRAW - if (AffichEdge) - { - std::cout << " End Construction of parallel edges " << std::endl; - } -#endif - //------------------------------------------------------------------- // Cut faces by edges. //------------------------------------------------------------------- @@ -1281,16 +1212,6 @@ void BRepFill_Evolved::ElementaryPerform(const TopoDS_Face& Sp, } } myIsDone = true; - -#ifdef DRAW - if (AffichEdge) - { - std::cout << " End of construction of an elementary volevo." << std::endl; - char name[100]; - Sprintf(name, "VEVO_%d", ++NbVEVOS); - DBRep::Set(name, myShape); - } -#endif } //================================================================================================= @@ -1393,19 +1314,6 @@ void BRepFill_Evolved::PlanarPerform(const TopoDS_Face& Sp, } } } -#ifdef DRAW - if (AffichEdge) - { - NCollection_DataMap::Iterator it(MapVP); - int k = 0; - for (; it.More(); it.Next()) - { - char name[100]; - Sprintf(name, "PARALI_%d", ++k); - DBRep::Set(name, it.Value()); - } - } -#endif //---------------------------------------------------- // Construction of faces limited by parallels. @@ -1508,24 +1416,7 @@ void BRepFill_Evolved::VerticalPerform(const TopoDS_Face& Sp, First = false; } -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "PARALI_%d", ++NbVEVOS); - DBRep::Set(name, Base); - } -#endif - BRepSweep_Prism PS(Base, gp_Vec(0, 0, Alt2 - Alt1), false); -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "PRISM_%d", NbVEVOS); - DBRep::Set(name, PS.Shape()); - } -#endif Base = PS.LastShape(); @@ -1815,15 +1706,6 @@ void BRepFill_Evolved::PrepareSpine( // Construct curves 3D of the spine BRepLib::BuildCurves3d(WorkSpine); - -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "workspine"); - DBRep::Set(name, WorkSpine); - } -#endif } //================================================================================================= @@ -2315,28 +2197,9 @@ void BRepFill_Evolved::MakePipe(const TopoDS_Edge& SE, const gp_Ax3& AxeRef) TopoDS_Wire GenProf = TopoDS::Wire(Modif.ModifiedShape(DummyProf)); -#ifdef DRAW - if (AffichGeom) - { - char name[100]; - Sprintf(name, "EVOLBASE_%d", ++NbFACES); - DBRep::Set(name, SE); - Sprintf(name, "EVOLPROF_%d", NbFACES); - DBRep::Set(name, GenProf); - } -#endif - BRepFill_Pipe Pipe(BRepLib_MakeWire(SE), GenProf); // BRepFill_Pipe Pipe = BRepFill_Pipe(BRepLib_MakeWire(SE),GenProf); -#ifdef DRAW - if (AffichGeom) - { - char name[100]; - Sprintf(name, "EVOL_%d", ++NbFACES); - DBRep::Set(name, Pipe.Shape()); - } -#endif //--------------------------------------------- // Arrangement of Tubes in myMap. //--------------------------------------------- @@ -2402,20 +2265,6 @@ void BRepFill_Evolved::MakeRevol(const TopoDS_Edge& SE, BRepSweep_Revol Rev(GenProf, AxeRev, true); -#ifdef DRAW - if (AffichGeom) - { - char name[100]; - Sprintf(name, "EVOLBASE_%d", ++NbFACES); - DrawTrSurf::Set(name, new Geom_Line(AxeRev)); - // DrawTrSurf::Set(name,new Geom_Line(AxeRev)); - Sprintf(name, "EVOLPROF_%d", NbFACES); - DBRep::Set(name, GenProf); - - Sprintf(name, "EVOL_%d", NbFACES); - DBRep::Set(name, Rev.Shape()); - } -#endif //-------------------------------------------- // Arrangement of revolutions in myMap. //--------------------------------------------- @@ -2497,19 +2346,6 @@ void BRepFill_Evolved::TransformInitWork(const TopLoc_Location& LS, const TopLoc { mySpine.Move(LS); myProfile.Move(LP); - -#ifdef DRAW - if (AffichEdge) - { - char name[100]; - Sprintf(name, "movedspine"); - TopoDS_Face SL = mySpine; - DBRep::Set(name, SL); - Sprintf(name, "movedprofile"); - TopoDS_Wire PL = myProfile; - DBRep::Set(name, PL); - } -#endif } //======================================================================= @@ -2707,21 +2543,6 @@ void TrimFace(const TopoDS_Face& Face, NCollection_Sequence& S) { -#ifdef DRAW - int NB = TheEdges.Length(); - if (AffichEdge) - { - char name[100]; - std::cout << " TrimFace " << ++NbTRIMFACES; - std::cout << " : " << NB << " edges within the restriction" << std::endl; - for (int j = 1; j <= NB; j++) - { - Sprintf(name, "TRIMEDGE_%d_%d", NbTRIMFACES, j); - DBRep::Set(name, TopoDS::Edge(TheEdges.Value(j))); - } - } -#endif - //-------------------------------------- // Creation of wires limiting faces. //-------------------------------------- diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx index 836bd6a43a..418a642bf5 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_MultiLine.cxx @@ -44,12 +44,6 @@ #include #include -#ifdef DRAW - #include -static bool AffichCurve = false; -static int NbProj = 1; -#endif - // POP pour NT #include @@ -498,20 +492,6 @@ void BRepFill_MultiLine::Curves(occ::handle& Curve, new Geom_TrimmedCurve(Line, myBis.FirstParameter(), myBis.LastParameter()); Curve = GeomProjLib::ProjectOnPlane(TLine, Plane, gp::DZ(), false); -#ifdef DRAW - if (AffichCurve) - { - char name[100]; - Sprintf(name, "C2_%d", NbProj); - DrawTrSurf::Set(name, TLine); - Sprintf(name, "C3_%d", NbProj); - DrawTrSurf::Set(name, Curve); - Sprintf(name, "SS_%d", NbProj); - DrawTrSurf::Set(name, Plane); - NbProj++; - } -#endif - // eval PCurve1 PCurve1 = GeomProjLib::Curve2d(Curve, Plane); @@ -568,17 +548,6 @@ static gp_Pnt2d ValueOnFace(const double U, gp_Pnt2d P = TheBis.Value(U); Geom2dAPI_ProjectPointOnCurve Ext(P, TheU.Curve(), TheU.FirstParameter(), TheU.LastParameter()); -#ifdef DRAW - if (AffichCurve) - { - char* TheUname = "TheU"; - char* PP1name = "PP1"; - DrawTrSurf::Set(TheUname, TheU.Curve()); - DrawTrSurf::Set(PP1name, P); - // DrawTrSurf::Set("TheU",TheU.Curve()); - // DrawTrSurf::Set("PP1",P); - } -#endif // constexpr double mult = 5.; constexpr double eps = mult * Precision::Confusion(); @@ -651,16 +620,6 @@ static gp_Pnt2d ValueOnFace(const double U, occ::handle Line = new Geom2d_Line(gp_Pnt2d(0., Dist), gp::DX2d()); -#ifdef DRAW - if (AffichCurve) - { - static const char* aTheV = "TheV"; - DrawTrSurf::Set(aTheV, TheV.Curve()); - static const char* aLINF1 = "LINF1"; - DrawTrSurf::Set(aLINF1, Line); - } -#endif - const Geom2dAdaptor_Curve& Cu1 = TheV; Geom2dAdaptor_Curve Cu2(Line); diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx index e9c54d9af9..64ef35c2d0 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_NSections.cxx @@ -55,11 +55,6 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepFill_NSections, BRepFill_SectionLaw) static bool Affich = 0; #endif -#ifdef DRAW - #include - #include -#endif - //======================================================================= // function : EdgeToBSpline // purpose : auxiliary -- get curve from edge and convert it to bspline @@ -374,16 +369,6 @@ BRepFill_NSections::BRepFill_NSections(const NCollection_Sequence& #ifdef OCCT_DEBUG if (Affich) { - #ifdef DRAW - int NBSECT = 0; - for (int i = 1; i <= S.Length(); i++) - { - NBSECT++; - char name[256]; - Sprintf(name, "WIRE_%d", NBSECT); - DBRep::Set(name, TopoDS::Wire(S.Value(i))); - } - #endif } #endif bool ok = true; @@ -558,14 +543,6 @@ void BRepFill_NSections::Init(const NCollection_Sequence& P, const bool { mySurface->IncreaseDegree(mySurface->UDegree(), 2); } -#ifdef DRAW - if (Affich) - { - char* name = new char[100]; - Sprintf(name, "Ref_Surf"); - DrawTrSurf::Set(name, mySurface); - } -#endif // Fill tables if (Build) diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx index 322f1c3f50..215d3aa925 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_OffsetWire.cxx @@ -81,21 +81,6 @@ #include #ifdef OCCT_DEBUG - // #define DRAW - #ifdef DRAW - #include - #include - #include - #include - #include -static bool AffichGeom = false; -static bool Affich2d = false; -static bool AffichEdge = false; -static int NbTRIMEDGES = 0; -static int NbOFFSET = 0; -static int NbEDGES = 0; -static int NbBISSEC = 0; - #endif #endif // Modified by Sergey KHROMOV - Thu Nov 16 17:24:39 2000 Begin @@ -798,12 +783,6 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine, } #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichEdge) - { - std::cout << " End Construction of geometric primitives " << std::endl; - } - #endif #endif //--------------------------------------------------- @@ -826,15 +805,6 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine, CurrentArc = Locus.Graph()->Arc(i); Bisector_Bisec Bisec = Locus.GeomBis(CurrentArc, Reverse); #ifdef OCCT_DEBUG - #ifdef DRAW - - if (AffichGeom) - { - char name[256]; - Sprintf(name, "BISSEC_%d", NbBISSEC++); - DrawTrSurf::Set(name, Bisec.Value()); - } - #endif #endif //------------------------------------------------------------------- @@ -1009,12 +979,6 @@ void BRepFill_OffsetWire::PerformWithBiLo(const TopoDS_Face& Spine, } #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichEdge) - { - std::cout << " End Construction of vertices on offsets" << std::endl; - } - #endif #endif //---------------------------------- @@ -1258,15 +1222,6 @@ void BRepFill_OffsetWire::PrepareSpine() } #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichEdge) - { - DBRep::Set("WS", myWorkSpine); - DBRep::Set("MS", mySpine); - BRepTools::Write(myWorkSpine, "WS"); - BRepTools::Write(mySpine, "MS"); - } - #endif #endif } @@ -2072,14 +2027,6 @@ void MakeCircle(const TopoDS_Edge& Map.Add(V, LL); #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichGeom && !OE.IsNull()) - { - char name[256]; - Sprintf(name, "OFFSET_%d", ++NbOFFSET); - DBRep::Set(name, OE); - } - #endif #endif } @@ -2202,15 +2149,6 @@ void MakeOffset(const TopoDS_Edge& Map.Add(E, LL); #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichGeom && !OE.IsNull()) - { - char name[256]; - Sprintf(name, "OFFSET_%d", ++NbOFFSET); - DBRep::Set(name, OE); - // double ii = 0; - } - #endif #endif } } @@ -2465,28 +2403,6 @@ void TrimEdge( TheBuilder.Range(NewEdge, ThePar.Value(k), ThePar.Value(k + 1)); #ifdef OCCT_DEBUG - #ifdef DRAW - if (AffichEdge) - { - char name[256]; - Sprintf(name, "TRIMEDGE_%d", NbTRIMEDGES); - DBRep::Set(name, NewEdge); - } - if (Affich2d) - { - TopLoc_Location L; - double f, l; - occ::handle Surf; - occ::handle C; - BRep_Tool::CurveOnSurface(NewEdge, C, Surf, L, f, l); - char name[256]; - Sprintf(name, "OFFSET2d_%d", NbTRIMEDGES++); - occ::handle C2d = new Geom2d_TrimmedCurve(C, f, l); - occ::handle dr = new DrawTrSurf_Curve2d(C2d, false); - dr->SetColor(Draw_bleu); - Draw::Set(name, dr); - } - #endif #endif S.Append(NewEdge); } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Pipe.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Pipe.cxx index 4c982e28d2..fe56a3af79 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Pipe.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Pipe.cxx @@ -59,11 +59,6 @@ #include #include -#ifdef DRAW - #include -static bool Affich = 0; -#endif - // --------------------------------------------------------------------------------- // static function: UpdateMap // purpose: @@ -304,15 +299,6 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine, RemLoc.Remove(myLast); myLast = RemLoc.GetResult(); -#ifdef DRAW - if (Affich) - { - DBRep::Set("theprof", TheProf); - DBRep::Set("thefirst", myFirst); - DBRep::Set("thelast", myLast); - } -#endif - myShape = MakeShape(TheProf, myProfile, myFirst, myLast); } diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx index 6c0e273993..8cd60c1134 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_PipeShell.cxx @@ -78,12 +78,6 @@ IMPLEMENT_STANDARD_RTTIEXT(BRepFill_PipeShell, Standard_Transient) // Specification Guide -#ifdef DRAW - #include - #include - #include -static bool Affich = 0; -#endif #include #include @@ -380,10 +374,6 @@ void BRepFill_PipeShell::Set(const TopoDS_Wire& AuxiliarySpine, BRepFill::SearchOrigin(TheGuide, SpOr, Dir, 100 * myTol3d); } -#ifdef DRAW - if (Affich) - DBRep::Set("theguide", TheGuide); -#endif // transform the guide in a single curve occ::handle Guide = new (BRepAdaptor_CompCurve)(TheGuide); @@ -719,13 +709,6 @@ bool BRepFill_PipeShell::Build() } // eap 5 Jun 2002 occ332, end modif } -#ifdef DRAW - if (Affich) - { - DBRep::Set("PipeFirst", myFirst); - DBRep::Set("PipeLast", myLast); - } -#endif // 3) Construction BRepFill_Sweep MkSw(mySection, myLocation, true); @@ -1109,20 +1092,6 @@ void BRepFill_PipeShell::Prepare() break; } -#ifdef DRAW - if (Affich) - { - char* name = new char[100]; - int NBSECT = 0; - for (int i = 1; i <= WSeq.Length(); i++) - { - NBSECT++; - Sprintf(name, "WSeq_%d", NBSECT); - DBRep::Set(name, TopoDS::Wire(WSeq.Value(i))); - } - } -#endif - // Calculate work sections NCollection_Sequence WorkingSections; WorkingSections.Clear(); diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx index 6416b548c5..d929e65530 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_Sweep.cxx @@ -83,19 +83,13 @@ #include #include + // #include // modified by NIZHNY-MKK Wed Oct 22 12:25:45 2003 // #include // #include // #include // OCC500(apo) -#ifdef DRAW - #include - #include - #include - #include -static bool Affich = 0; -#endif //================================================================================================= @@ -650,10 +644,6 @@ static void BuildFace( } WW = B.Wire(); -#ifdef DRAW - if (Affich) - DBRep::Set("wire-on-face", WW); -#endif // Construction of the face. if (IsPlan) @@ -792,18 +782,6 @@ static TopoDS_Edge BuildEdge(occ::handle& C3d, BRepLib_MakeEdge MkE(C3d, VF, VL, f, l); if (!MkE.IsDone()) { // Error of construction !! -#ifdef DRAW - char name[100]; - Sprintf(name, "firstvertex_error"); - DBRep::Set(name, VF); - Sprintf(name, "lastvertex_error"); - DBRep::Set(name, VL); - Sprintf(name, "curve3d_error"); - char* Temp = name; - DrawTrSurf::Set(Temp, C3d); - // DrawTrSurf::Set(name, C3d); - throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge"); -#endif } E = MkE.Edge(); @@ -888,18 +866,6 @@ static bool Filling(const TopoDS_Shape& WithE4 = true; } -#ifdef DRAW - if (Affich) - { - DBRep::Set("Fill_Edge1", E1); - DBRep::Set("Fill_Edge2", E2); - if (!E3.IsNull()) - DBRep::Set("Fill_Edge3", E3); - if (!E4.IsNull()) - DBRep::Set("Fill_Edge4", E4); - } -#endif - // Construction of a surface of revolution occ::handle Prof1, Prof2; // int ii, jj;//, Nb; @@ -977,14 +943,6 @@ static bool Filling(const TopoDS_Shape& */ } -#ifdef DRAW - if (Affich) - { - char* Temp = "Surf_Init"; - DrawTrSurf::Set(Temp, Surf); - } -#endif - occ::handle C1, C2, C3, C4; /* // Deform the surface of revolution. @@ -1299,11 +1257,6 @@ static bool Filling(const TopoDS_Shape& if (ToReverseResult) Result.Reverse(); -#ifdef DRAW - if (Affich) - DBRep::Set("BoucheTrou", Result); -#endif - return true; } @@ -1567,17 +1520,6 @@ static TopoDS_Edge BuildEdge(const occ::handle& S, if (!MkE.IsDone()) { // Erreur de construction !! -#ifdef DRAW - char name[100]; - Sprintf(name, "firstvertex_error"); - DBRep::Set(name, VFirst); - Sprintf(name, "lastvertex_error"); - DBRep::Set(name, VLast); - Sprintf(name, "curve3d_error"); - char* Temp = name; - DrawTrSurf::Set(Temp, Iso); -// DrawTrSurf::Set(name,Iso); -#endif throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge"); } @@ -2125,32 +2067,9 @@ bool BRepFill_Sweep::BuildWire(const BRepFill_TransitionStyle /*Transition*/) Iso->LastParameter()); if (!MkE.IsDone()) { // Error of construction !! -#ifdef DRAW - char name[100]; - Sprintf(name, "firstvertex_error"); - DBRep::Set(name, myVEdges->Value(1, ipath)); - Sprintf(name, "lastvertex_error"); - DBRep::Set(name, myVEdges->Value(1, ipath + 1)); - Sprintf(name, "curve3d_error"); - char* Temp = name; - DrawTrSurf::Set(Temp, Iso); - // DrawTrSurf::Set(name,Iso); - throw Standard_ConstructionError("BRepFill_Sweep::BuildEdge"); -#endif return false; } E = MkE.Edge(); -#ifdef DRAW - if (Affich) - { - Sprintf(name, "Surf_%d", ipath); - char* Temp = name; - DrawTrSurf::Set(Temp, S); - // DrawTrSurf::Set(name, S); - Sprintf(name, "Edge_%d", ipath); - DBRep::Set(name, E); - } -#endif B.UpdateEdge(E, Sweep.ErrorOnSurface()); B.Add(wire, E); myFaces->SetValue(1, ipath, E); @@ -2177,10 +2096,7 @@ bool BRepFill_Sweep::BuildShell( const double ExtendFirst, const double ExtendLast) { - int ipath, isec, IPath; -#ifdef DRAW - char name[100]; -#endif + int ipath, isec, IPath; BRep_Builder B; int NbPath = ILast - IFirst; int NbLaw = mySec->NbLaw(); @@ -2291,15 +2207,6 @@ bool BRepFill_Sweep::BuildShell( GeomLib::ExtendSurfByLength(BndS, ExtendLast, 1, Sweep.ExchangeUV(), true); TabS(isec, ipath) = BndS; } - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "Surf_%d_%d", isec, IPath); - char* Temp = name; - DrawTrSurf::Set(Temp, TabS(isec, ipath)); - } -#endif } } @@ -2866,35 +2773,6 @@ bool BRepFill_Sweep::BuildShell( // (3) Construction of Faces TopoDS_Face face; -#ifdef DRAW - if (Affich) - { - for (ipath = 1, IPath = IFirst; ipath <= NbPath; ipath++, IPath++) - { - for (isec = 1; isec <= NbLaw + 1; isec++) - { - Sprintf(name, "uedge_%d_%d", isec, IPath); - DBRep::Set(name, UEdge(isec, ipath)); - } - } - - for (ipath = 1, IPath = IFirst; ipath <= NbPath + 1; ipath++, IPath++) - { - for (isec = 1; isec <= NbLaw; isec++) - { - Sprintf(name, "vedge_%d_%d", isec, IPath); - DBRep::Set(name, VEdge(isec, ipath)); - } - - for (isec = 1; isec <= NbLaw + 1; isec++) - { - Sprintf(name, "vertex_%d_%d", isec, IPath); - DBRep::Set(name, Vertex(isec, ipath)); - } - } - } -#endif - for (ipath = 1, IPath = IFirst; ipath <= NbPath; ipath++, IPath++) { for (isec = 1; isec <= NbLaw; isec++) diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx index 240a2a1b64..206b0b31e1 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimEdgeTool.cxx @@ -37,15 +37,6 @@ #include #ifdef OCCT_DEBUG - // #define DRAW - #ifdef DRAW - #include - #include - #include -static bool Affich = false; -static bool AffichInt = false; -static int intind = 0; - #endif #endif //================================================================================================= @@ -93,15 +84,6 @@ BRepFill_TrimEdgeTool::BRepFill_TrimEdgeTool(const Bisector_Bisec& else { myC1 = occ::down_cast(S1); -#ifdef DRAW - if (Affich) - { - // POP pour NT - char* myC1name = "myC1"; - DrawTrSurf::Set(myC1name, myC1); - // DrawTrSurf::Set("myC1",myC1); - } -#endif } if (isPoint2) { @@ -110,26 +92,11 @@ BRepFill_TrimEdgeTool::BRepFill_TrimEdgeTool(const Bisector_Bisec& else { myC2 = occ::down_cast(S2); -#ifdef DRAW - if (Affich) - { - char* myC2name = "myC2"; - DrawTrSurf::Set(myC2name, myC2); - // DrawTrSurf::Set("myC2",myC2); - } -#endif } // return the simple expression of the bissectrice occ::handle Bis; SimpleExpression(myBisec, Bis); myBis = Geom2dAdaptor_Curve(Bis); -#ifdef DRAW - if (Affich) - { - char* myBisname = "myBis"; - DrawTrSurf::Set(myBisname, Bis); - } -#endif } //======================================================================= @@ -327,29 +294,6 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1, BRep_Tool::CurveOnSurface(Edge2, C2, Surf, L, f, l); Geom2dAdaptor_Curve AC2(C2, f, l); -#ifdef DRAW - if (AffichInt) - { - f = AC1.FirstParameter(); - l = AC1.LastParameter(); - char name[32]; - Sprintf(name, "C1_%d", ++intind); - DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C1, f, l)); - f = AC2.FirstParameter(); - l = AC2.LastParameter(); - Sprintf(name, "C2_%d", intind); - DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(C2, f, l)); - f = myBis.FirstParameter(); - l = myBis.LastParameter(); - Sprintf(name, "BIS%d", intind); - DrawTrSurf::Set(name, new Geom2d_TrimmedCurve(myBis.Curve(), f, l)); - Sprintf(name, "E1_%d", intind); - DBRep::Set(name, Edge1); - Sprintf(name, "E2_%d", intind); - DBRep::Set(name, Edge2); - } -#endif - // Calculate intersection NCollection_Sequence Points2; gp_Pnt PSeq; diff --git a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx index 310aa055a9..df6dfa8fb5 100644 --- a/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx +++ b/src/ModelingAlgorithms/TKBool/BRepFill/BRepFill_TrimSurfaceTool.cxx @@ -53,12 +53,7 @@ #include #include -// #define DRAW #include -#ifdef DRAW - #include - #include -#endif #ifdef OCCT_DEBUG static bool Affich = false; static int NBCALL = 0; @@ -94,24 +89,6 @@ BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool(const occ::handleTrimSurfaceTool : NBCALL = " << NBCALL << std::endl; - #ifdef DRAW - char name[256]; - - Sprintf(name, "FACE1_%d", NBCALL); - DBRep::Set(name, myFace1); - - Sprintf(name, "FACE2_%d", NBCALL); - DBRep::Set(name, myFace2); - - Sprintf(name, "EDGE1_%d", NBCALL); - DBRep::Set(name, myEdge1); - - Sprintf(name, "EDGE2_%d", NBCALL); - DBRep::Set(name, myEdge2); - - Sprintf(name, "BISSEC_%d", NBCALL); - DrawTrSurf::Set(name, myBis); - #endif } #endif } @@ -396,19 +373,6 @@ void BRepFill_TrimSurfaceTool::IntersectWith(const TopoDS_Edge& EdgeO const TopoDS_Edge& EdgeOnF2, NCollection_Sequence& Points) const { -#ifdef DRAW - if (Affich) - { - char name[256]; - int i1 = 0, i2 = 2; - Sprintf(name, "EdgeOnF1_%d_%d", i1, NBCALL); - DBRep::Set(name, EdgeOnF1); - - Sprintf(name, "EdgeOnF2_%d_%d", i2, NBCALL); - DBRep::Set(name, EdgeOnF2); - } - -#endif Points.Clear(); NCollection_Sequence Points2; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/FILES.cmake b/src/ModelingAlgorithms/TKBool/TopOpeBRep/FILES.cmake index 2470578a1f..94f164d3b7 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/FILES.cmake +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/FILES.cmake @@ -10,7 +10,6 @@ set(OCCT_TopOpeBRep_FILES TopOpeBRep_Bipoint.hxx TopOpeBRep_define.hxx - TopOpeBRep_DRAW.hxx TopOpeBRep_DSFiller.cxx TopOpeBRep_DSFiller.hxx TopOpeBRep_EdgesFiller.cxx diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_DRAW.hxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_DRAW.hxx deleted file mode 100644 index a84a5f6a81..0000000000 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_DRAW.hxx +++ /dev/null @@ -1,24 +0,0 @@ -// Created on: 1997-11-26 -// 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 _TopOpeBRep_DRAW_HeaderFile -#define _TopOpeBRep_DRAW_HeaderFile - -#ifdef DRAW - #include -#endif - -#endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx index f03ec3fb46..931f72d228 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_EdgesIntersector.cxx @@ -14,45 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef DRAW -static void CurveToString(const GeomAbs_CurveType t, TCollection_AsciiString& N) -{ - switch (t) - { - case GeomAbs_Line: - N = "LINE"; - break; - case GeomAbs_Circle: - N = "CIRCLE"; - break; - case GeomAbs_Ellipse: - N = "ELLIPSE"; - break; - case GeomAbs_Hyperbola: - N = "HYPERBOLA"; - break; - case GeomAbs_Parabola: - N = "PARABOLA"; - break; - case GeomAbs_BezierCurve: - N = "BEZIER"; - break; - case GeomAbs_BSplineCurve: - N = "BSPLINE"; - break; - case GeomAbs_OffsetCurve: - N = "OFFSET"; - break; - case GeomAbs_OtherCurve: - N = "OTHER"; - break; - default: - N = "UNKNOWN"; - break; - } -} -#endif - #include #include #include @@ -540,16 +501,6 @@ void TopOpeBRep_EdgesIntersector::Perform(const TopoDS_Shape& E1, if (TopOpeBRep_GettraceFITOL()) { std::cout << "EdgesIntersector : Perform"; - #ifdef DRAW - GeomAbs_CurveType t1 = myCurve1.GetType(); - GeomAbs_CurveType t2 = myCurve2.GetType(); - TCollection_AsciiString s1; - CurveToString(t1, s1); - std::cout << " " << s1; - TCollection_AsciiString s2; - CurveToString(t2, s2); - std::cout << " " << s2; - #endif std::cout << std::endl; std::cout << " tol1 = " << tol1 << std::endl; std::cout << " tol2 = " << tol2 << std::endl; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx index 2d327a1a87..8513f3319b 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesFiller_1.cxx @@ -45,10 +45,6 @@ #include #include -#ifdef DRAW - #include -#endif - #ifdef OCCT_DEBUG Standard_EXPORT void debrest(const int i) { @@ -65,42 +61,12 @@ extern bool GLOBAL_bvpr; extern void debvprmess(int f1, int f2, int il, int vp, int si); extern bool TopOpeBRep_GetcontextNOPUNK(); - #ifdef DRAW -static void FUN_traceRLine(const TopOpeBRep_LineInter& L) -{ - - TCollection_AsciiString ee("Edofline"); - ee.Cat(L.Index()); - char* eee = ee.ToCString(); - DBRep::Set(eee, L.Arc()); -} - #else static void FUN_traceRLine(const TopOpeBRep_LineInter&) { // } - #endif - #ifdef DRAW -static void FUN_traceGLine(const TopOpeBRep_LineInter& L) - #else -static void FUN_traceGLine(const TopOpeBRep_LineInter&) - #endif -{ - #ifdef DRAW - TCollection_AsciiString ll("Glineof"); - ll.Cat(L.Index()); - char* lll = ll.ToCString(); - occ::handle c = L.Curve(); - int iINON1, iINONn, nINON; - L.VPBounds(iINON1, iINONn, nINON); - double par1 = L.VPoint(iINON1).ParameterOnLine(); - double parn = L.VPoint(iINONn).ParameterOnLine(); - bool isperiodic = L.IsPeriodic(); - occ::handle tc = new Geom_TrimmedCurve(c, par1, parn, true); - DrawTrSurf::Set(lll, tc); - #endif -} +static void FUN_traceGLine(const TopOpeBRep_LineInter&) {} #endif #define M_FORWARD(o) (o == TopAbs_FORWARD) @@ -1131,11 +1097,6 @@ void TopOpeBRep_FacesFiller::FillLineVPonR() //---------------------------------------------------------------------- #ifdef OCCT_DEBUG - #ifdef DRAW - bool trcd = false; - if (trcd) - FUN_DrawMap(myDataforDegenEd); - #endif #endif TopOpeBRep_VPointInterIterator VPI; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx index 0ca2897b36..7b445b994e 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_FacesIntersector.cxx @@ -19,10 +19,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include #include #include @@ -59,11 +55,6 @@ static void SAVFF(const TopoDS_Face& F1, const TopoDS_Face& F2) an2 = an2 + SAVFFi2; const char* n1 = an1.ToCString(); const char* n2 = an2.ToCString(); - #ifdef DRAW - std::cout << "FaceIntersector : set " << n1 << "," << n2 << std::endl; - DBRep::Set(n1, F1); - DBRep::Set(n2, F2); - #endif std::cout << "FaceIntersector : write " << n1 << "," << n2 << std::endl; BRepTools::Write(F1, n1); BRepTools::Write(F2, n2); diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_Point2d.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_Point2d.cxx index df542bf15c..71a4337c1e 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_Point2d.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_Point2d.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef DRAW - #include -#endif - #include #include #include @@ -131,10 +127,6 @@ void TopOpeBRep_Point2d::Dump(const int E1index, const int E2index) const std::cout << std::endl; gp_Pnt P3D = Value(); - #ifdef DRAW - std::cout << FUN_tool_PRODINP() << "P" << Index() << " " << P3D.X() << " " << P3D.Y() << " " - << P3D.Z() << "; # tol = " << tol << std::endl; - #endif std::cout << " on (1) :"; std::cout << " vertex(1) : "; std::cout << (isvertex1 ? 1 : 0); diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_ProcessGR.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_ProcessGR.cxx index 4d408390a7..39d19857d8 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_ProcessGR.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_ProcessGR.cxx @@ -20,10 +20,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include #include // #include @@ -169,14 +165,6 @@ TopAbs_State TopOpeBRep_FacesFiller::StBipVPonF(const TopOpeBRep_VPointInter& vp gp_Pnt pmil = BC.Value(parmil); #ifdef OCCT_DEBUG - #ifdef DRAW - bool trc = TopOpeBRep_GettraceBIPS(); - if (trc) - { - TCollection_AsciiString aa("pmil"); - FUN_brep_draw(aa, pmil); - } - #endif #endif TopAbs_State st = FSC_StatePonFace(pmil, F, *myPShapeClassifier); return st; @@ -252,16 +240,6 @@ bool TopOpeBRep_FacesFiller::LSameDomainERL(const TopOpeBRep_LineInter& if (L.TypeLineCurve() == TopOpeBRep_WALKING) return isone; -#ifdef DRAW - bool trc = false; - if (trc) - { - occ::handle C = L.Curve(); - TCollection_AsciiString aa("line"); - FUN_brep_draw(aa, C); - } -#endif - double f, l; TopOpeBRep_FacesFiller::Lminmax(L, f, l); double d = std::abs(f - l); diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vpr.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vpr.cxx index 8b397e65a7..b0a27f57be 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vpr.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vpr.cxx @@ -24,10 +24,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include #include #include diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vprdeg.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vprdeg.cxx index 3c1ab293a1..d02cf5b5da 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vprdeg.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRep/TopOpeBRep_vprdeg.cxx @@ -24,10 +24,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include // #include #include diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx index 8977d8458e..847644bbb3 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_BlockBuilder.cxx @@ -125,31 +125,6 @@ void TopOpeBRepBuild_BlockBuilder::MakeBlock(TopOpeBRepBuild_ShapeSet& SS) Mextent = myOrientedShapeMap.Extent(); myBlocks.Append(Mextent + 1); myIsDone = true; - -#if 0 -// version seche - myOrientedShapeMap.Clear(); - myOrientedShapeMapIsValid.Clear(); - myBlocks.Clear(); - while (SS.MoreStartElements()) { - int last = myOrientedShapeMap.Extent(); - int index =AddElement(SS.StartElement()); - if (index > last) { - myBlocks.Append(index); - while (index <= myOrientedShapeMap.Extent()) { - for (SS.InitNeighbours(myOrientedShapeMap(index)); - SS.MoreNeighbours(); - SS.NextNeighbour()) { - AddElement(SS.Neighbour()); - } - index++; - } - } - SS.NextStartElement(); - } - myBlocks.Append(myOrientedShapeMap.Extent()+1); - myBlockIndex = 1; -#endif } //================================================================================================= diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx index 432a17b537..9d4c81d1c7 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FREGU.cxx @@ -31,10 +31,6 @@ extern bool TopOpeBRepBuild_GettraceSAVFREGU(); void debregufa(const int /*iF*/) {} #endif -#ifdef DRAW - #include -#endif - #define M_FORWARD(O) (O == TopAbs_FORWARD) #define M_REVERSED(O) (O == TopAbs_REVERSED) @@ -359,16 +355,4 @@ void TopOpeBRepBuild_Builder::RegularizeFace(const TopoDS_Shape& FF, } // explore(fsdFF,TopAbs_EDGE) } // itlfsdFF.More() -#ifdef DRAW - if (tSPSFF) - debregufa(iF); - if (tSPSFF && savfregu) - { - TCollection_AsciiString str("fregu"); - str = str + iF; - DBRep::Set(str.ToCString(), newFace); - std::cout << "newFace " << str << " built on face " << iF << " saved" << std::endl; - } -#endif - } // RegularizeFace diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx index df01624714..447060782c 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_FaceBuilder.cxx @@ -54,10 +54,6 @@ extern bool TopOpeBRepBuild_GettracePURGE(); void debifb() {} #endif -#ifdef DRAW - #include -#endif - //================================================================================================= TopOpeBRepBuild_FaceBuilder::TopOpeBRepBuild_FaceBuilder() = default; @@ -125,11 +121,6 @@ int FUN_AnalyzemapVon1E( const NCollection_IndexedDataMap& mapVon1E, NCollection_IndexedDataMap& mapVV) { -#ifdef DRAW - bool trc = TopOpeBRepBuild_GettracePURGE(); - if (trc) - std::cout << std::endl << "* DetectUnclosedWire :" << std::endl; -#endif int res = ISUNKNOWN; @@ -191,60 +182,6 @@ int FUN_AnalyzemapVon1E( return res; } // FUN_AnalyzemapVon1E -#ifdef DRAW -void FUN_AnalyzemapVon1EDRAW( - const int res, - const NCollection_IndexedDataMap& mapVon1E, - const NCollection_IndexedDataMap& mapVV, - const TopoDS_Shape& W, - const int iiwi, - NCollection_IndexedDataMap& mapVon1EdgeDRAW, - NCollection_IndexedDataMap& mapVVsameGDRAW) -{ - bool trc = TopOpeBRepBuild_GettracePURGE(); - if (!trc) - return; - std::cout << "wire " << iiwi; - if (res == ISVERTEX) - { - std::cout << " is vertex" << std::endl; - } - else if (res == CLOSEDW) - { - std::cout << " is closed" << std::endl; - } - else if (res == GCLOSEDW) - { - std::cout << " is Gclosed :" << std::endl; - TCollection_AsciiString aa("w_"); - FUN_tool_draw(aa, W, iiwi); - int i; - for (i = 1; i <= mapVV.Extent(); i++) - { - int iV = mapVVsameGDRAW.Add(mapVV.FindKey(i), mapVV.FindFromIndex(i)); - std::cout << " on vve_" << iV; - aa = "vve_"; - FUN_tool_draw(aa, mapVVsameGDRAW.FindKey(iV), iV); - } - for (i = 1; i <= mapVon1E.Extent(); i++) - { - int iE = mapVon1EdgeDRAW.Add(mapVon1E.FindKey(i), mapVon1E.FindFromIndex(i)); - std::cout << " on eed_" << iE; - aa = "eed_"; - FUN_tool_draw(aa, mapVon1EdgeDRAW.FindFromIndex(iE), iE); - } - std::cout << std::endl; - } - else if (res == UNCLOSEDW) - { - std::cout << " is unclosed " << std::endl; - TCollection_AsciiString aa("w_"); - FUN_tool_draw(aa, W, iiwi); - } - std::cout << std::endl; -} // FUN_AnalyzemapVon1EDRAW -#endif - //================================================================================================= void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire( @@ -265,15 +202,6 @@ void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire( // the vertex is connected to only one unclosed,undegenerated edge. // * Else,if it is unclosed,we delete it (or it`s hanging edges). -#ifdef DRAW - NCollection_IndexedDataMap mapVon1EdgeDRAW, - mapVVsameGDRAW; - bool trc = TopOpeBRepBuild_GettracePURGE(); - if (trc) - std::cout << std::endl << "* DetectUnclosedWire :" << std::endl << std::endl; - int iiwi = 0; // DEB -#endif - InitFace(); for (; MoreFace(); NextFace()) { @@ -281,11 +209,6 @@ void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire( for (; MoreWire(); NextWire()) { bool isold = IsOldWire(); -#ifdef DRAW - iiwi++; - if (trc && isold) - std::cout << "wire " << iiwi << " is old wire => closed" << std::endl; -#endif if (isold) continue; @@ -303,9 +226,6 @@ void TopOpeBRepBuild_FaceBuilder::DetectUnclosedWire( NCollection_IndexedDataMap mapVV; int res = FUN_AnalyzemapVon1E(mapVon1E, mapVV); -#ifdef DRAW - FUN_AnalyzemapVon1EDRAW(res, mapVon1E, mapVV, W, iiwi, mapVon1EdgeDRAW, mapVVsameGDRAW); -#endif if (res == ISVERTEX) { diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx index cf21879924..79b8b31184 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridEE.cxx @@ -24,10 +24,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include #include #include @@ -908,16 +904,7 @@ void TopOpeBRepBuild_Builder::GFillPointTopologyPVS(const TopoDS_Shape& } if (tSPS) { - // bool trc = false; - #ifdef DRAW - if (trc) - { - FUN_draw2d(par, TopoDS::Edge(E), myEdgeReference, myFaceReference); - FUN_draw(VPV); - FUN_draw(E); - FUN_draw(myFaceReference); - } - #endif + // bool trc = false; } #endif } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx index 3b5c32fa11..6d21c25b16 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridFF.cxx @@ -38,11 +38,6 @@ #include #include -#ifdef DRAW -Standard_IMPORT void FUN_draw(const TopoDS_Shape& s); -Standard_IMPORT void FUN_draw2de(const TopoDS_Shape& ed, const TopoDS_Shape& fa); -#endif - #ifdef OCCT_DEBUG extern void* GFABUMAKEFACEPWES_DEB; #define DEBSHASET(sarg, meth, shaset, str) \ @@ -698,16 +693,13 @@ void TopOpeBRepBuild_Builder::GFillWireWES(const TopoDS_Shape& GLOBAL_iexE++; if (tSPS) { - // const TopoDS_Edge& ed = TopoDS::Edge(EOR); - // bool isdegen = BRep_Tool::Degenerated(ed); - // TopLoc_Location L; - // occ::handle S = BRep_Tool::Surface(myFaceToFill,L); - // bool isclosed = BRep_Tool::IsClosed(ed,S,L); - // TopAbs_Orientation oried = ed.Orientation(); - // bool trc = false; - #ifdef DRAW - // if (trc) {FUN_draw(ed); FUN_draw2de(ed,myFaceReference);} - #endif + // const TopoDS_Edge& ed = TopoDS::Edge(EOR); + // bool isdegen = BRep_Tool::Degenerated(ed); + // TopLoc_Location L; + // occ::handle S = BRep_Tool::Surface(myFaceToFill,L); + // bool isclosed = BRep_Tool::IsClosed(ed,S,L); + // TopAbs_Orientation oried = ed.Orientation(); + // bool trc = false; } #endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx index 4f4e815823..26398b3ed5 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_GridSS.cxx @@ -59,12 +59,6 @@ #include #include -#ifdef DRAW - #include - #include - #include -#endif - #ifdef OCCT_DEBUG #define DEBSHASET(sarg, meth, shaset, str) \ TCollection_AsciiString sarg((meth)); \ @@ -225,10 +219,6 @@ NCollection_List& losplits) #ifdef OCCT_DEBUG bool trc = false; -#ifdef DRAW - if (trc) {TCollection_AsciiString aa("PCinf");FUN_tool_draw(aa,Einf2pi,F,0);} - if (trc) {TCollection_AsciiString aa("PCsup");FUN_tool_draw(aa,Esup2pi,F,0);} -#endif #endif losplits.Append(Einf2pi); losplits.Append(Esup2pi); }*/ diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx index ced9fb86ce..2c3c888356 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Griddump.cxx @@ -21,10 +21,6 @@ #include #include -#ifdef DRAW - #include -#endif - #include #include #include @@ -563,11 +559,6 @@ void TopOpeBRepBuild_Builder::GdumpFABU(TopOpeBRepBuild_FaceBuilder& ME) const TopExp::Vertices(EE, VF, VR); if (!VF.IsNull() && !VR.IsNull() && !EE.IsNull()) { - #ifdef DRAW - DBRep::Set(Enam.ToCString(), EE); - DBRep::Set(VFnam.ToCString(), VF); - DBRep::Set(VRnam.ToCString(), VR); - #endif std::cout << PRODINS << "-O -p 0.5 " << Enam; std::cout << "; "; // std::cout< -#endif - //================================================================================================= void TopOpeBRepBuild_Builder::RegularizeSolids(const TopoDS_Shape& SO, @@ -324,16 +320,4 @@ void TopOpeBRepBuild_Builder::RegularizeSolid(const TopoDS_Shape& SS } // explore(ssdSS,TopAbs_FACE) } // itlssdSS.More() -#ifdef DRAW - if (tSPS) - debreguso(iS); - if (tSPS && savsregu) - { - TCollection_AsciiString str("sregu"); - str = str + iS; - DBRep::Set(str.ToCString(), newSolid); - std::cout << "newSolid " << str << " built on Solid " << iS << " saved" << std::endl; - } -#endif - } // RegularizeSolid diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx index 864145b37b..eda7975563 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_Section.cxx @@ -75,10 +75,6 @@ Standard_EXPORT void debspseon(const int i) extern bool TopOpeBRepTool_GettraceC2D(); #endif -#ifdef DRAW - #include -#endif - // Standard_IMPORT void FUN_tool_ttranslate(const gp_Vec2d& tvector, const TopoDS_Face& fF, // TopoDS_Edge& fyE); @@ -409,20 +405,6 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges() FUN_selLEE(LE1loc, E2, TopAbs_IN, LE1inE2); int nLE1inE2 = LE1inE2.Extent(); -#ifdef DRAW - if (tSPS) - { - std::cout << "# edges ON " << iE << " "; - TopAbs::Print(TopAbs_IN, std::cout); - std::cout << " / esd"; - std::cout << " " << iESD; - std::cout << " : (" << nLE1inE2 << ")" << std::endl; - TCollection_AsciiString str("ON"); - str = str + iE + "IN" + iESD; - FDRAW_DINLOE(" ", LE1inE2, str, ""); - } -#endif - // edges E1 and E2 share LE1inE2 if (nLE1inE2 != 0) { // 2.2 @@ -481,22 +463,6 @@ void TopOpeBRepBuild_Builder::SplitSectionEdges() } // 2.2 } -#ifdef DRAW - if (tSPS) - { - std::cout << std::endl << "# edges ON " << iE << " "; - TopAbs::Print(TopAbs_OUT, std::cout); - std::cout << " / lesd"; - for (NCollection_List::Iterator it(LESD); it.More(); it.Next()) - std::cout << " " << myDataStructure->Shape(it.Value()); - int n = LEoutLESD.Extent(); - std::cout << " : (" << n << ")" << std::endl; - TCollection_AsciiString str("ON"); - str = str + iE + "OUT"; - FDRAW_DINLOE(" ", LEoutLESD, str, ""); - } -#endif - if (!MEOUT.IsBound(E)) { NCollection_List thelist5; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx index b2d280116b..0cda715c8b 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShapeSet.cxx @@ -21,37 +21,6 @@ #include #include -#ifdef DRAW - #include - #include - #include - #include - #include -static TCollection_AsciiString PRODINS("dins "); - -static void ShapeEnumToString(const TopAbs_ShapeEnum T, TCollection_AsciiString& N) -{ - if (T == TopAbs_SHAPE) - N = "s"; - else if (T == TopAbs_COMPOUND) - N = "co"; - else if (T == TopAbs_COMPSOLID) - N = "cs"; - else if (T == TopAbs_SOLID) - N = "so"; - else if (T == TopAbs_SHELL) - N = "sh"; - else if (T == TopAbs_FACE) - N = "f"; - else if (T == TopAbs_WIRE) - N = "w"; - else if (T == TopAbs_EDGE) - N = "e"; - else if (T == TopAbs_VERTEX) - N = "v"; -} -#endif - #ifdef OCCT_DEBUG extern bool TopOpeBRepBuild_GettraceCHK(); extern bool TopOpeBRepBuild_GettraceCHKOK(); @@ -442,176 +411,11 @@ void TopOpeBRepBuild_ShapeSet::DumpCheck(Standard_OStream&, //================================================================================================= -void TopOpeBRepBuild_ShapeSet::DumpSS() -{ -#ifdef DRAW - DumpName(std::cout, "\nDumpSS start "); - NCollection_List::Iterator it; - int i, j, ne; - TCollection_AsciiString s1(" "); - InitShapes(); - std::cout << std::endl << "#Shapes : "; - if (!MoreShapes()) - std::cout << 0; - std::cout << std::endl; - for (i = 1; MoreShapes(); NextShape(), i++) - { - TCollection_AsciiString ns = SNameori(Shape()); - std::cout << PRODINS << ns << "; # " << i << " draw" << std::endl; - DBRep::Set(ns.ToCString(), Shape()); - } - - InitStartElements(); - std::cout << "#StartElements : "; - if (!MoreStartElements()) - std::cout << 0; - std::cout << std::endl; - for (i = 1; MoreStartElements(); NextStartElement(), i++) - { - std::cout << PRODINS << SNameori(StartElement()) << "; # " << i << " draw" << std::endl; - } - - InitStartElements(); - std::cout << "#Neighbours of StartElements : "; - if (!MoreStartElements()) - std::cout << 0; - std::cout << std::endl; - for (i = 1; MoreStartElements(); NextStartElement(), i++) - { - const TopoDS_Shape& e = StartElement(); - TCollection_AsciiString enam = SNameori(e); - InitNeighbours(e); - if (MoreNeighbours()) - { - TCollection_AsciiString sne("clear; "); - sne = sne + PRODINS + enam; - for (ne = 1; MoreNeighbours(); NextNeighbour(), ne++) - { - const TopoDS_Shape& N = Neighbour(); - sne = sne + " " + SNameori(N); - } - sne = sne + "; wclick; #draw"; - std::cout << sne << std::endl; - } - } - - int ism, nsm = mySubShapeMap.Extent(); - std::cout << "#Incident shapes : "; - if (!nsm) - std::cout << 0; - std::cout << std::endl; - for (i = 1, ism = 1; ism <= nsm; ism++, i++) - { - const TopoDS_Shape& v = mySubShapeMap.FindKey(ism); - const NCollection_List& lsv = mySubShapeMap.FindFromIndex(ism); - NCollection_List::Iterator itle(lsv); - if (itle.More()) - { - TCollection_AsciiString vnam = SName(v); - TCollection_AsciiString sle("clear; "); - sle = sle + PRODINS + vnam; - for (j = 1; itle.More(); itle.Next(), j++) - { - const TopoDS_Shape& e = itle.Value(); - sle = sle + " " + SNameori(e); - } - sle = sle + "; wclick; #draw"; - std::cout << sle << std::endl; - } - } - DumpName(std::cout, "DumpSS end "); -#endif -} +void TopOpeBRepBuild_ShapeSet::DumpSS() {} //================================================================================================= -void TopOpeBRepBuild_ShapeSet::DumpBB() -{ -#ifdef DRAW - DumpName(std::cout, "\nDumpBB "); - NCollection_List::Iterator it; - int i, j, ne = 0, nb = 1, curr, currloc; - TCollection_AsciiString s1(" "), stt, enam, nnam, vnam; - InitShapes(); - - std::cout << std::endl << "#Shapes : (block old) "; - if (!MoreShapes()) - std::cout << 0; - std::cout << std::endl; - for (i = 1; MoreShapes(); NextShape(), i++, nb++) - { - std::cout << "Block number" << nb << " (old)." << std::endl; - const TopoDS_Shape& e = Shape(); - TopoDS_Iterator ShapIter(e); - for (ne = 1; ShapIter.More(); ShapIter.Next(), ne++) - { - const TopoDS_Shape& subsha = ShapIter.Value(); - ShapeEnumToString(subsha.ShapeType(), stt); - enam = stt + ne + "ShaB" + nb; - DBRep::Set(enam.ToCString(), subsha); - std::cout << "clear; " << PRODINS << enam << "; #draw" << std::endl; - } - } - - InitStartElements(); - NCollection_IndexedMap mos; - std::cout << "#Elements : (block new) : "; - if (!MoreStartElements()) - std::cout << 0; - std::cout << std::endl; - mos.Clear(); - for (; MoreStartElements(); NextStartElement()) - { - const TopoDS_Shape& e = StartElement(); - curr = mos.Extent(); - if (mos.Add(e) > curr) - { - std::cout << "#Block number" << nb << " (new)." << std::endl; - nb++; - ne++; - enam = ""; - enam = enam + "ste" + ne + "newB" + nb; - DBRep::Set(enam.ToCString(), e); - - while (curr < mos.Extent()) - { - curr = mos.Extent(); - currloc = curr; - InitNeighbours(mos.FindKey(curr)); - for (; MoreNeighbours(); NextNeighbour()) - { - const TopoDS_Shape& N = Neighbour(); - if (mos.Add(N) > currloc) - { - currloc++; - ne++; - // to know if ste or ele is displayed; start - const NCollection_List& LSE = StartElements(); - it.Initialize(LSE); - while (it.More()) - if (it.Value() == N) - break; - else - it.Next(); - enam = ""; - if (it.More()) - { - enam = enam + "ste" + ne + "newB" + nb; - DBRep::Set(enam.ToCString(), N); - } - else - { - enam = enam + "ele" + ne + "newB" + nb; - DBRep::Set(enam.ToCString(), N); - std::cout << PRODINS << enam << "; #draw" << std::endl; - } - } - } - } - } - } -#endif -} +void TopOpeBRepBuild_ShapeSet::DumpBB() {} //================================================================================================= @@ -643,38 +447,6 @@ int TopOpeBRepBuild_ShapeSet::DEBNumber() const //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const TopoDS_Shape& /*S*/, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -{ - TCollection_AsciiString str; - - str = sb; - TCollection_AsciiString WESi = myDEBName.SubString(1, 1) + myDEBNumber; - str = str + WESi; - TopAbs_ShapeEnum t = S.ShapeType(); - TCollection_AsciiString sts; - ShapeEnumToString(t, sts); - sts.UpperCase(); - str = str + sts.SubString(1, 1); - int isub = mySubShapeMap.FindIndex(S); - int ista = myOMSS.FindIndex(S); - int iele = myOMES.FindIndex(S); - int isha = myOMSH.FindIndex(S); - if (isub) - str = str + "sub" + isub; - if (ista) - str = str + "sta" + ista; - else if (iele) - str = str + "ele" + iele; - if (isha) - str = str + "sha" + isha; - str = str + sa; - - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const TopoDS_Shape&, const TCollection_AsciiString&, const TCollection_AsciiString&) const @@ -682,23 +454,9 @@ TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const TopoDS_Shape&, TCollection_AsciiString str; return str; } -#endif //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SNameori(const TopoDS_Shape& S, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -{ - TCollection_AsciiString str; - str = sb + SName(S); - TCollection_AsciiString sto = TopAbs::ShapeOrientationToString(S.Orientation()); - str = str + sto.SubString(1, 1); - str = str + sa; - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SNameori(const TopoDS_Shape&, const TCollection_AsciiString&, const TCollection_AsciiString&) const @@ -706,21 +464,9 @@ TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SNameori(const TopoDS_Shape&, TCollection_AsciiString str; return str; } -#endif //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const NCollection_List& L, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& /*sa*/) const -{ - TCollection_AsciiString str; - for (NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SName(it.Value()) + sa + " "; - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const NCollection_List&, const TCollection_AsciiString&, const TCollection_AsciiString&) const @@ -728,7 +474,6 @@ TCollection_AsciiString TopOpeBRepBuild_ShapeSet::SName(const NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SNameori(it.Value()) + sa + " "; -#endif return str; } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx index 43fd7973c6..70cfbb513b 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_ShellFaceSet.cxx @@ -14,11 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef DRAW - #include -static TCollection_AsciiString PRODINS("dins "); -#endif - #include #include #include @@ -118,20 +113,6 @@ void TopOpeBRepBuild_ShellFaceSet::DumpSS() //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape& S, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -{ - TCollection_AsciiString str = sb; - - str = str + TopOpeBRepBuild_ShapeSet::SName(S); - str = str + sa; - DBRep::Set(str.ToCString(), S); - - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape&, const TCollection_AsciiString& sb, const TCollection_AsciiString&) const @@ -139,48 +120,19 @@ TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const TopoDS_Shape&, TCollection_AsciiString str = sb; return str; } -#endif //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori( - const TopoDS_Shape& S, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -#else TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori(const TopoDS_Shape&, const TCollection_AsciiString& sb, const TCollection_AsciiString&) const -#endif { TCollection_AsciiString str = sb; -#ifdef DRAW - str = str + TopOpeBRepBuild_ShapeSet::SNameori(S); - if (S.ShapeType() == TopAbs_FACE) - { - const TopoDS_Shape& F = TopoDS::Face(S); - DBRep::Set(str.ToCString(), S); - } -#endif return str; } //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const NCollection_List& L, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -{ - TCollection_AsciiString str; - - for (NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SName(it.Value()) + sa + " "; - - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const NCollection_List&, const TCollection_AsciiString&, const TCollection_AsciiString&) const @@ -188,7 +140,6 @@ TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SName(const NCollection_Li TCollection_AsciiString str; return str; } -#endif //================================================================================================= @@ -198,9 +149,5 @@ TCollection_AsciiString TopOpeBRepBuild_ShellFaceSet::SNameori( const TCollection_AsciiString& /*sa*/) const { TCollection_AsciiString str; -#ifdef DRAW - for (NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SNameori(it.Value()) + sa + " "; -#endif return str; } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx index 30a4948251..1602ad0614 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeClassifier.cxx @@ -16,10 +16,6 @@ #include -#ifdef DRAW - #include -#endif - #include #include #include diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx index 27e1857fe2..e1c408f080 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_WireEdgeSet.cxx @@ -14,11 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef DRAW - #include -static TCollection_AsciiString PRODINS("dins "); -#endif - #include #include #include @@ -57,32 +52,6 @@ TopOpeBRepBuild_WireEdgeSet::TopOpeBRepBuild_WireEdgeSet(const TopoDS_Shape& F, : TopOpeBRepBuild_ShapeSet(TopAbs_VERTEX) { myFace = TopoDS::Face(F); - -#ifdef DRAW - myDEBName = "WES"; - LOCAL_PBUILDER_DEB = (TopOpeBRepBuild_Builder*)((void*)A); - if (LOCAL_PBUILDER_DEB != NULL) - { - myDEBNumber = LOCAL_PBUILDER_DEB->GdumpSHASETindex(); - int iF; - bool tSPS = LOCAL_PBUILDER_DEB->GtraceSPS(F, iF); - if (tSPS) - { - DumpName(std::cout, "creation "); - std::cout << " on "; - } - if (tSPS) - { - LOCAL_PBUILDER_DEB->GdumpSHA(F, NULL); - std::cout << std::endl; - } - } - if (TopOpeBRepBuild_GettraceCHK() && !myCheckShape) - { - DumpName(std::cout, "no checkshape in creation of "); - std::cout << std::endl; - } -#endif } //================================================================================================= @@ -103,16 +72,6 @@ void TopOpeBRepBuild_WireEdgeSet::AddShape(const TopoDS_Shape& S) if (tocheck) chk = CheckShape(S); -#ifdef DRAW - if (TopOpeBRepBuild_GettraceCHK() && CheckShape()) - { - if (!tocheck) - DumpCheck(std::cout, " AddShape WIRE on closed face", S, chk); - else - DumpCheck(std::cout, " AddShape redefined", S, chk); - } -#endif - if (!chk) return; ProcessAddShape(S); @@ -162,23 +121,6 @@ const TopoDS_Face& TopOpeBRepBuild_WireEdgeSet::Face() const void TopOpeBRepBuild_WireEdgeSet::InitNeighbours(const TopoDS_Shape& E) { -#ifdef DRAW - bool traceSS = TopOpeBRepBuild_GettraceSS(); - int ista = myOMSS.FindIndex(E); - bool tsh = (ista) ? TopOpeBRep_GettraceSHA(ista) : false; - - if (traceSS || tsh) - { - TCollection_AsciiString str("#**** InitNeighbours"); - if (tsh) - str = str + " on WES edge " + SNameori(E); - str = str + " #****"; - std::cout << std::endl << str << std::endl; - if (tsh) - debwesclo(ista); - } -#endif - mySubShapeExplorer.Init(E, mySubShapeType); myCurrentShape = E; FindNeighbours(); @@ -223,57 +165,23 @@ const NCollection_List& TopOpeBRepBuild_WireEdgeSet::MakeNeighbour int nclosing = NbClosingShapes(l); -#ifdef DRAW - bool traceSS = TopOpeBRepBuild_GettraceSS(); - if (traceSS) - { - TCollection_AsciiString svel = SNameVEL(V, E, l); - std::cout << PRODINS << svel << "; #---- WES MNL" << std::endl; - } -#endif - if (nclosing) { // build myCurrentShapeNeighbours = // edge list made of connected shapes to Earg through Varg myCurrentShapeNeighbours.Clear(); -#ifdef DRAW - int iapp = 0; -#endif for (NCollection_List::Iterator it(l); it.More(); it.Next()) { -#ifdef DRAW - iapp++; -#endif const TopoDS_Shape& curn = it.Value(); // current neighbour bool k = VertexConnectsEdgesClosing(V, E, curn); if (k) { myCurrentShapeNeighbours.Append(curn); - -#ifdef DRAW - if (traceSS) - { - int rang = myCurrentShapeNeighbours.Extent(); - const TopoDS_Edge& EE = TopoDS::Edge(curn); - std::cout << "+ EE " << iapp << " , rang " << rang << " "; - TCollection_AsciiString svee = SNameVEE(V, E, EE); - std::cout << svee << std::endl; - } -#endif } } int newn = NbClosingShapes(myCurrentShapeNeighbours); -#ifdef DRAW - if (traceSS) - { - std::cout << "#~~~~connexes apres VertexConnectsEdgesClosing : "; - TCollection_AsciiString svel = SNameVEL(V, E, myCurrentShapeNeighbours); - std::cout << svel << std::endl; - } -#endif if (newn >= 2) { @@ -302,14 +210,8 @@ const NCollection_List& TopOpeBRepBuild_WireEdgeSet::MakeNeighbour d1E.Reverse(); NCollection_List::Iterator lclo(myCurrentShapeNeighbours); -#ifdef DRAW - int rang = 0; -#endif while (lclo.More()) { -#ifdef DRAW - rang++; -#endif if (!IsClosed(lclo.Value())) { lclo.Next(); @@ -338,31 +240,6 @@ const NCollection_List& TopOpeBRepBuild_WireEdgeSet::MakeNeighbour bool t2 = ((cross > 0) && oVE == TopAbs_REVERSED) || ((cross < 0) && oVE == TopAbs_FORWARD); -#ifdef DRAW - if (traceSS) - { - std::cout << "#-------- rang " << rang << std::endl; - TCollection_AsciiString svee = SNameVEE(V, E, EE); - std::cout << svee << std::endl; - - std::cout << " fiE,laE : " << fiE << " " << laE << std::endl; - std::cout << " parE " << parE << std::endl; - std::cout << " puE,pvE " << pE.X() << " " << pE.Y(); - std::cout << " d1uE,d1vE " << d1E.X() << " " << d1E.Y() << std::endl; - std::cout << std::endl; - std::cout << " fiEE,laEE : " << fiEE << " " << laEE << std::endl; - std::cout << " parEE " << parEE << std::endl; - std::cout << " puEE,pvEE " << pEE.X() << " " << pEE.Y(); - std::cout << " d1uEE,d1vEE " << d1EE.X() << " " << d1EE.Y() << std::endl; - std::cout << " --> cross " << cross << std::endl; - - if (t2) - std::cout << " t2 --> on garde EE" << std::endl << std::endl; - else - std::cout << " t2 --> on vire EE" << std::endl << std::endl; - } -#endif - if (t2) { //-- t1 // c'est la bonne IsClosed,on ne garde qu'elle parmi les IsClosed @@ -374,15 +251,6 @@ const NCollection_List& TopOpeBRepBuild_WireEdgeSet::MakeNeighbour myCurrentShapeNeighbours.Remove(lclo); } } - -#ifdef DRAW - if (traceSS) - { - std::cout << "#~~~~connexes apres filtre geom : "; - TCollection_AsciiString svel = SNameVEL(Varg, Earg, myCurrentShapeNeighbours); - std::cout << svel << std::endl; - } -#endif } return myCurrentShapeNeighbours; } @@ -462,15 +330,6 @@ bool TopOpeBRepBuild_WireEdgeSet::VertexConnectsEdgesClosing(const TopoDS_Shape& // et telle que orientation(V/E1) # orientation(V/E2) // ==> face de part et d'autre des coutures -#ifdef DRAW - if (TopOpeBRepBuild_GetcontextSSCONNEX()) - { - if (testconnect) - resu = VertexConnectsEdges(V, E1, E2, o1, o2); - return resu; - } -#endif - if ((c1 && c2)) { bool u1 = c1 ? IsUClosed(E1) : false; @@ -619,27 +478,6 @@ bool TopOpeBRepBuild_WireEdgeSet::IsVClosed(const TopoDS_Shape& E) const //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEE(const TopoDS_Shape& VV, - const TopoDS_Shape& EE1, - const TopoDS_Shape& EE2) const -{ - TCollection_AsciiString str; - const TopoDS_Vertex& V = TopoDS::Vertex(VV); - const TopoDS_Shape& E1 = TopoDS::Edge(EE1); - const TopoDS_Shape& E2 = TopoDS::Edge(EE2); - TopAbs_Orientation oVE1, oVE2; - bool conn = VertexConnectsEdges(V, E1, E2, oVE1, oVE2); - str = SName(VV) + " "; - str = str + SNameori(E1) + " V/E1 : "; - TCollection_AsciiString so1 = TopAbs::ShapeOrientationToString(oVE1); - str = str + so1.SubString(1, 1) + " "; - str = str + SNameori(E2) + " V/E2 : "; - TCollection_AsciiString so2 = TopAbs::ShapeOrientationToString(oVE2); - str = str + so2.SubString(1, 1) + " "; - return str; -} -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEE(const TopoDS_Shape&, const TopoDS_Shape&, const TopoDS_Shape&) const @@ -647,130 +485,58 @@ TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEE(const TopoDS_Shape TCollection_AsciiString str; return str; } -#endif //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEL( - const TopoDS_Shape& V, - const TopoDS_Shape& E, - const NCollection_List& L) const -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameVEL( const TopoDS_Shape&, const TopoDS_Shape&, const NCollection_List&) const -#endif { TCollection_AsciiString str; -#ifdef DRAW - int nc = NbClosingShapes(L), nl = L.Extent(); - str = SNameori(E) + " " + SName(V) + " " + SNameori(L); -#endif return str; } //================================================================================================= -void TopOpeBRepBuild_WireEdgeSet::DumpSS() -{ -#ifdef DRAW - TopOpeBRepBuild_ShapeSet::DumpSS(); -#endif -} +void TopOpeBRepBuild_WireEdgeSet::DumpSS() {} //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SName(const TopoDS_Shape& S, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SName(const TopoDS_Shape&, const TCollection_AsciiString& sb, const TCollection_AsciiString&) const -#endif { TCollection_AsciiString str = sb; -#ifdef DRAW - str = str + TopOpeBRepBuild_ShapeSet::SName(S); - str = str + sa; - DBRep::Set(str.ToCString(), S); -#endif return str; } //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameori( - const TopoDS_Shape& S, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameori(const TopoDS_Shape&, const TCollection_AsciiString& sb, const TCollection_AsciiString&) const -#endif { TCollection_AsciiString str = sb; -#ifdef DRAW - str = str + TopOpeBRepBuild_ShapeSet::SNameori(S); - if (S.ShapeType() == TopAbs_EDGE) - { - const TopoDS_Shape& E = TopoDS::Edge(S); - bool c = IsClosed(E), u = IsUClosed(E), v = IsVClosed(E); - if (c) - str = str + "c"; - if (u) - str = str + "u"; - if (v) - str = str + "v"; - str = str + sa; - DBRep::Set(str.ToCString(), S); - } -#endif return str; } //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SName(const NCollection_List& L, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SName(const NCollection_List&, const TCollection_AsciiString&, const TCollection_AsciiString&) const -#endif { TCollection_AsciiString str; -#ifdef DRAW - for (NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SName(it.Value()) + sa + " "; -#endif return str; } //================================================================================================= -#ifdef DRAW -TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameori( - const NCollection_List& L, - const TCollection_AsciiString& sb, - const TCollection_AsciiString& sa) const -#else TCollection_AsciiString TopOpeBRepBuild_WireEdgeSet::SNameori(const NCollection_List&, const TCollection_AsciiString&, const TCollection_AsciiString&) const -#endif { TCollection_AsciiString str; -#ifdef DRAW - for (NCollection_List::Iterator it(L); it.More(); it.Next()) - str = str + sb + SNameori(it.Value()) + sa + " "; -#endif return str; } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx index 77e617b441..0f543a1134 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makeedges.cxx @@ -36,10 +36,6 @@ extern void debedbu(const int i) } #endif -#ifdef DRAW - #include -#endif - //================================================================================================= void TopOpeBRepBuild_Builder::GPVSMakeEdges(const TopoDS_Shape& EF, @@ -207,15 +203,4 @@ void TopOpeBRepBuild_Builder::GEDBUMakeEdges(const TopoDS_Shape& EF, } } // EDBU.InitEdge : loop on EDBU edges -#ifdef DRAW - if (tSPS) - { - TCollection_AsciiString str1; - str1 = "e"; - TCollection_AsciiString str2; - str2 = iE; - FDRAW_DINLOE("", LOE, str1, str2); - } -#endif - } // GEDBUMakeEdges diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx index c344d23027..8cad5bdeae 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepBuild/TopOpeBRepBuild_makefaces.cxx @@ -73,11 +73,6 @@ Standard_EXPORT void debcorriso(const int i) extern void* GFABUMAKEFACEPWES_DEB; #endif -#ifdef DRAW - #include - #include -#endif - Standard_EXPORT bool FUN_tool_ClosedW(const TopoDS_Wire& W); // Unused : @@ -122,39 +117,6 @@ void TopOpeBRepBuild_Builder::GWESMakeFaces(const TopoDS_Shape& FF, topurge = false; #endif -#ifdef DRAW - bool traceF = false; - if (traceF) - { - NCollection_IndexedMap mapW; - for (FABU.InitFace(); FABU.MoreFace(); FABU.NextFace()) - { - for (FABU.InitWire(); FABU.MoreWire(); FABU.NextWire()) - { - TopoDS_Shape W; - bool isold = FABU.IsOldWire(); - if (isold) - W = FABU.OldWire(); - else - { - BRep_Builder BB; - TopoDS_Compound cmp; - BB.MakeCompound(cmp); - FABU.InitEdge(); - for (; FABU.MoreEdge(); FABU.NextEdge()) - FABU.AddEdgeWire(FABU.Edge(), cmp); - W = cmp; - } - if (W.IsNull()) - continue; - int iiwi = mapW.Add(W); - TCollection_AsciiString aa("wii_"); - FUN_tool_draw(aa, W, iiwi); - } - } - } -#endif - if (topurge) { TopOpeBRepDS_DataStructure& BDS = myDataStructure->ChangeDS(); @@ -215,27 +177,6 @@ void TopOpeBRepBuild_Builder::GWESMakeFaces(const TopoDS_Shape& FF, if (topurge) { -#ifdef DRAW - if (tSPS) - { - std::cout << std::endl << "#<< AVANT PurgeClosingEdges " << std::endl; - GdumpFABU(FABU); - NCollection_List dLOF; - NCollection_DataMap dMWisOld; - GFABUMakeFaces(FF, FABU, dLOF, dMWisOld); - NCollection_List::Iterator X(dLOF); - for (int i = 1; X.More(); X.Next(), i++) - { - TCollection_AsciiString ss("purclo"); - ss = ss + i; - DBRep::Set(ss.ToCString(), X.Value()); - std::cout << "... face " << ss << std::endl; - } - debpurclomess(iF); - DEBpurclo = true; - } -#endif - const TopoDS_Face& FA = TopoDS::Face(FF); bool puok = TopOpeBRepTool::PurgeClosingEdges(FA, LOF, MWisOld, MshNOK); if (!puok) diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/FILES.cmake b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/FILES.cmake index 787ab23c23..f58df3e7d5 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/FILES.cmake +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/FILES.cmake @@ -30,8 +30,6 @@ set(OCCT_TopOpeBRepDS_FILES TopOpeBRepDS_DataStructure.hxx TopOpeBRepDS_define.hxx - TopOpeBRepDS_DRAW.cxx - TopOpeBRepDS_DRAW.hxx TopOpeBRepDS_Dumper.cxx TopOpeBRepDS_Dumper.hxx TopOpeBRepDS_Edge3dInterferenceTool.cxx diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx index 83484e1134..c02152091a 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_BuildTool.cxx @@ -56,9 +56,6 @@ #include // includes especially needed by the static Project function -#ifdef DRAW - #include -#endif Standard_EXPORT occ::handle BASISCURVE2D(const occ::handle& C); @@ -1415,9 +1412,6 @@ void TopOpeBRepDS_BuildTool::RecomputeCurveOnCone if (comppc1) PC1new = myCurveTool.MakePCurveOnFace(F1,C3Dnew,tolreached2d1); if (comppc2) PC2new = myCurveTool.MakePCurveOnFace(F2,C3Dnew,tolreached2d2); -#ifdef DRAW - if (tBUTO) {FUN_draw(F1); FUN_draw(F2); FUN_draw(E);} -#endif double newtol,newparmin,newparmax; FUN_updateEDGECURVETOL diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.cxx deleted file mode 100644 index 6d2cdb0332..0000000000 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.cxx +++ /dev/null @@ -1,245 +0,0 @@ -// Created on: 1997-11-26 -// 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 DRAW - #include - #include - - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - -Standard_EXPORT void FUN_draw(const TopoDS_Shape& s) -{ - char* nnn = TCollection_AsciiString("name").ToCString(); - if (s.IsNull()) - std::cout << "nullshape" << std::endl; - DBRep::Set(nnn, s); -} - -Standard_EXPORT void FUN_draw(const gp_Pnt& p) -{ - char* nnn = TCollection_AsciiString("name").ToCString(); - DrawTrSurf::Set(nnn, p); -} - -Standard_EXPORT void FUN_draw(const gp_Pnt2d& p) -{ - char* nnn = TCollection_AsciiString("name").ToCString(); - DrawTrSurf::Set(nnn, p); -} - -Standard_EXPORT void FUN_draw(const occ::handle c, const double dpar) -{ - char* nnn = TCollection_AsciiString("c2d").ToCString(); - if (dpar <= Precision::Confusion()) - { - DrawTrSurf::Set(nnn, c); - return; - } - occ::handle tC = new Geom2d_TrimmedCurve(c, 0., dpar); - DrawTrSurf::Set(nnn, tC); -} - -Standard_EXPORT void FUN_draw(const gp_Pnt& p, const gp_Dir& d) -{ - TCollection_AsciiString aa("dir"); - FUN_tool_draw(aa, p, d); -} - -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, const gp_Pnt& p) -{ - FUN_tool_draw(aa, p); -} - -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const gp_Pnt& p, - const gp_Dir& d) -{ - FUN_tool_draw(aa, p, d); -} - -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, const TopoDS_Shape& s) -{ - FUN_tool_draw(aa, s); -} - -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const occ::handle& C, - const double& f, - const double& l) -{ - FUN_tool_draw(aa, C, f, l); -} - -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const occ::handle& C) -{ - FUN_tool_draw(aa, C); -} - -Standard_EXPORT void FUN_DrawMap( - const NCollection_DataMap, TopTools_ShapeMapHasher>& - DataforDegenEd) -{ - NCollection_DataMap, TopTools_ShapeMapHasher>:: - Iterator itemap(DataforDegenEd); - for (; itemap.More(); itemap.Next()) - { - TopoDS_Shape v = itemap.Key(); - NCollection_List::Iterator itoflos(itemap.Value()); - if (!itoflos.More()) - continue; - TopoDS_Shape Ec = itoflos.Value(); - if (!itoflos.More()) - continue; - itoflos.Next(); - TopoDS_Shape Ed = itoflos.Value(); - - bool tr = false; - if (tr) - { - FUN_draw(v); - FUN_draw(Ec); - FUN_draw(Ed); - } - } -} - -static bool FUN_hascurveonsurf(const TopoDS_Edge& edge, const TopoDS_Face& face) -{ - TopLoc_Location L; - occ::handle S = BRep_Tool::Surface(face, L); - - occ::handle& TE = *((occ::handle*)&edge.TShape()); - const NCollection_List>& lcr = TE->Curves(); - NCollection_List>::Iterator itcr(lcr); - bool iscurveonS = false; - - for (; itcr.More(); itcr.Next()) - { - const occ::handle& cr = itcr.Value(); - bool iscurveonsurface = cr->IsCurveOnSurface(); - if (!iscurveonsurface) - continue; - iscurveonS = cr->IsCurveOnSurface(S, L); - if (iscurveonS) - break; - } - return iscurveonS; -} - -Standard_EXPORT void FUN_draw2de(const TopoDS_Shape& ed, const TopoDS_Shape& fa) -{ - char* nnn = TCollection_AsciiString("name").ToCString(); - double f, l; - if (ed.IsNull()) - return; - if (fa.IsNull()) - return; - TopoDS_Edge edge = TopoDS::Edge(ed); - TopoDS_Face face = TopoDS::Face(fa); - bool hascons = FUN_hascurveonsurf(edge, face); - if (!hascons) - return; - - TopAbs_Orientation ori = edge.Orientation(); - bool sense = (ori == TopAbs_FORWARD) ? true : false; - occ::handle C2d = BRep_Tool::CurveOnSurface(edge, face, f, l); - - occ::handle tC2d = new Geom2d_TrimmedCurve(C2d, f, l, sense); - DrawTrSurf::Set(nnn, tC2d); -} // FUN_draw2de - -Standard_EXPORT void FUN_draw2d(const double& par, - const TopoDS_Edge& E, - const TopoDS_Edge& Eref, - const TopoDS_Face& Fref) -{ - TopAbs_Orientation oriE = E.Orientation(); - TopAbs_Orientation oriEref = Eref.Orientation(); - bool ErefonFref = false; - bool EonFref = false; - TopExp_Explorer ex; - int ne = 0; - for (ex.Init(Fref, TopAbs_EDGE); ex.More(); ex.Next()) - ne++; - if (ne < 1) - return; - for (ex.Init(Fref, TopAbs_EDGE); ex.More(); ex.Next()) - { - const TopoDS_Edge ed = TopoDS::Edge(ex.Current()); - if (ed.IsSame(Eref)) - { - ErefonFref = true; - break; - } - if (ed.IsSame(E)) - { - EonFref = true; - break; - } - } - gp_Pnt2d p2d; - if (ErefonFref || EonFref) - { - double f, l; - occ::handle C2d; - if (ErefonFref) - { - C2d = BRep_Tool::CurveOnSurface(Eref, Fref, f, l); - FUN_draw2de(Eref, Fref); - } - if (EonFref) - { - C2d = BRep_Tool::CurveOnSurface(E, Fref, f, l); - FUN_draw2de(E, Fref); - } - C2d->D0(par, p2d); - } - else - { - double f, l; - occ::handle C3d = BRep_Tool::Curve(Eref, f, l); - gp_Pnt P; - C3d->D0(par, P); - occ::handle S = BRep_Tool::Surface(Fref); - GeomAPI_ProjectPointOnSurf PonS(P, S); - if (!PonS.Extrema().IsDone()) - return; - if (PonS.NbPoints() == 0) - return; - double u, v; - PonS.Parameters(1, u, v); - p2d = gp_Pnt2d(u, v); - } - - FUN_draw(p2d); -} // FUN_draw2d - -#endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.hxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.hxx deleted file mode 100644 index 431b795a3c..0000000000 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_DRAW.hxx +++ /dev/null @@ -1,60 +0,0 @@ -// Created on: 1997-11-26 -// 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_DRAW_HeaderFile -#define _TopOpeBRepDS_DRAW_HeaderFile - -#ifdef DRAW - #include - #include - #include - #include - #include - #include - #include - #include - #include - -Standard_EXPORT void FUN_draw(const TopoDS_Shape& s); -Standard_EXPORT void FUN_draw(const gp_Pnt& p); -Standard_EXPORT void FUN_draw(const gp_Pnt2d& p); -Standard_EXPORT void FUN_draw(const occ::handle c, const double dpar); -Standard_EXPORT void FUN_draw(const gp_Pnt& p, const gp_Dir& v); -Standard_EXPORT void FUN_draw(const gp_Pnt& p, const gp_Vec& v); -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, const gp_Pnt& p); -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const gp_Pnt& p, - const gp_Dir& d); -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, const TopoDS_Shape& s); -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const occ::handle& C, - const double& f, - const double& l); -Standard_EXPORT void FUN_brep_draw(const TCollection_AsciiString& aa, - const occ::handle& C); -Standard_EXPORT void FUN_DrawMap( - const NCollection_DataMap, TopTools_ShapeMapHasher>& - DataforDegenEd); -Standard_EXPORT void FUN_draw2de(const TopoDS_Shape& ed, const TopoDS_Shape& fa); -Standard_EXPORT void FUN_draw2d(const double& par, - const TopoDS_Edge& E, - const TopoDS_Edge& Eref, - const TopoDS_Face& Fref); - -#endif -// DRAW - -#endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx index 8d0558c770..f6c4d7b115 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepDS/TopOpeBRepDS_Transition.cxx @@ -263,11 +263,6 @@ TopAbs_Orientation TopOpeBRepDS_Transition::OrientationON(const TopAbs_State S, if (myStateBefore == TopAbs_ON && myStateAfter == TopAbs_ON) { -#if 0 - if ( S == TopAbs_IN ) result = TopAbs_FORWARD; - else if ( S == TopAbs_OUT ) result = TopAbs_REVERSED; - else if ( S == TopAbs_ON ) result = TopAbs_INTERNAL; -#endif if (S == TopAbs_IN) result = TopAbs_INTERNAL; else if (S == TopAbs_OUT) diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/FILES.cmake b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/FILES.cmake index 249d0af38c..082357b7c2 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/FILES.cmake +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/FILES.cmake @@ -25,8 +25,6 @@ set(OCCT_TopOpeBRepTool_FILES TopOpeBRepTool_CurveTool.hxx TopOpeBRepTool_defineG.hxx - TopOpeBRepTool_DRAW.cxx - TopOpeBRepTool_DRAW.hxx TopOpeBRepTool_face.cxx TopOpeBRepTool_face.hxx diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_2d.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_2d.cxx index 29784f1957..9ee1975d8a 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_2d.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_2d.cxx @@ -34,11 +34,6 @@ #include #include -#ifdef DRAW - #include - #include -#endif - #ifdef OCCT_DEBUG void debc2dnull(void) {} @@ -316,22 +311,6 @@ Standard_EXPORT occ::handle FC2D_MakeCurveOnSurface(const TopoDS_E double& tol, const bool trim3d) { -#ifdef DRAW - if (TopOpeBRepTool_GettraceC2D()) - { - std::cout << "\n#FC2D_MakeCurveOnSurface : " << std::endl; - TCollection_AsciiString fnam("c2df"); - GLOBAL_C2D_i++; - fnam = fnam + GLOBAL_C2D_i; - FDRAW_DINS("", F, fnam, ""); - TCollection_AsciiString enam("c2de"); - GLOBAL_C2D_i++; - enam = enam + GLOBAL_C2D_i; - FDRAW_DINE(" ", E, enam, "\n"); - std::cout.flush(); - debc2dnull(); - } -#endif occ::handle C2D = FC2D_make2d(E, F, f, l, tol, trim3d); FC2D_AddNewCurveOnSurface(C2D, E, F, f, l, tol); @@ -534,23 +513,6 @@ Standard_EXPORT occ::handle FC2D_CurveOnSurface(const TopoDS_Edge& return C2D; } -#ifdef DRAW - if (TopOpeBRepTool_GettraceC2D()) - { - std::cout << "\n#FC2D_CurveOnSurface : " << std::endl; - TCollection_AsciiString fnam("c2df"); - GLOBAL_C2D_i++; - fnam = fnam + GLOBAL_C2D_i; - FDRAW_DINS("", F, fnam, ""); - TCollection_AsciiString enam("c2de"); - GLOBAL_C2D_i++; - enam = enam + GLOBAL_C2D_i; - FDRAW_DINE(" ", E, enam, "\n"); - std::cout.flush(); - debc2dnull(); - } -#endif - C2D = FC2D_make2d(E, F, EF, f2d, l2d, tol, trim3d); FC2D_AddNewCurveOnSurface(C2D, E, F, f2d, l2d, tol); return C2D; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx index 249fa6d156..b4d4ca5413 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_CORRISO.cxx @@ -71,10 +71,6 @@ static void FUN_Raise() #endif } -#ifdef DRAW - #include -#endif - #define M_FORWARD(sta) (sta == TopAbs_FORWARD) #define M_REVERSED(sta) (sta == TopAbs_REVERSED) #define M_INTERNAL(sta) (sta == TopAbs_INTERNAL) @@ -131,13 +127,6 @@ bool TopOpeBRepTool_CORRISO::Refclosed(const int x, double& xperiod) const bool TopOpeBRepTool_CORRISO::Init(const TopoDS_Shape& S) { -#ifdef DRAW - int ie = 0; - bool trc = TopOpeBRepTool_GettraceCORRISO(); - bool INIT = true; - if (INIT) - FUN_REINIT(); -#endif myERep2d.Clear(); myEds.Clear(); @@ -154,13 +143,6 @@ bool TopOpeBRepTool_CORRISO::Init(const TopoDS_Shape& S) #ifdef OCCT_DEBUG int iE = STATIC_PURGE_mapeds.Add(E); (void)iE; // avoid warning - #ifdef DRAW - if (trc) - { - TCollection_AsciiString aa = TCollection_AsciiString("e"); - FUN_tool_draw(aa, E, iE); - } - #endif #endif // myEds : @@ -187,13 +169,6 @@ bool TopOpeBRepTool_CORRISO::Init(const TopoDS_Shape& S) #ifdef OCCT_DEBUG int aniE = STATIC_PURGE_mapeds.Add(E); (void)aniE; // avoid warning - #ifdef DRAW - if (trc) - { - TCollection_AsciiString bb = TCollection_AsciiString("v"); - FUN_tool_draw(bb, v, iv); - } - #endif #endif bool isb = myVEds.IsBound(v); if (isb) @@ -562,14 +537,6 @@ bool TopOpeBRepTool_CORRISO::PurgeFyClosingE(const NCollection_List -static int NbCalls = 0; -#endif //================================================================================================= TopOpeBRepTool_CurveTool::TopOpeBRepTool_CurveTool() = default; diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.cxx deleted file mode 100644 index 5b5fe2acb4..0000000000 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.cxx +++ /dev/null @@ -1,346 +0,0 @@ -// Created on: 1994-07-21 -// 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 DRAW - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - -Standard_IMPORT Draw_Color DrawTrSurf_CurveColor(const Draw_Color col); -Standard_IMPORT void DBRep_WriteColorOrientation(); -Standard_IMPORT Draw_Color DBRep_ColorOrientation(const TopAbs_Orientation Or); - -static Draw_MarkerShape MARKER3DSHAPE = Draw_Square; -static Draw_ColorKind MARKER3DCOLOR = Draw_magenta; -static int MARKER3DSIZE = 1; -static Draw_ColorKind SEGMENTCOLOR = Draw_vert; - -//=========================================================================== -void TopOpeBRepTool_DrawPoint(const gp_Pnt& P, const Draw_MarkerShape T, const Draw_ColorKind C) -//=========================================================================== -{ - dout << new Draw_Marker3D(P, T, C, MARKER3DSIZE); - dout.Flush(); -} - -void TopOpeBRepTool_DrawPoint(const gp_Pnt& P, const Draw_ColorKind C) -{ - TopOpeBRepTool_DrawPoint(P, MARKER3DSHAPE, C); -} - -void TopOpeBRepTool_DrawPoint(const gp_Pnt& P) -{ - TopOpeBRepTool_DrawPoint(P, MARKER3DSHAPE, MARKER3DCOLOR); -} - -//=========================================================================== -void TopOpeBRepTool_DrawSegment(const gp_Pnt& P1, const gp_Pnt& P2, const Draw_ColorKind C) -//=========================================================================== -{ - dout << new Draw_Segment3D(P1, P2, C); - TopOpeBRepTool_DrawPoint(P1); - TopOpeBRepTool_DrawPoint(P2); -} - -void TopOpeBRepTool_DrawSegment(const gp_Pnt& P1, const gp_Pnt& P2) -{ - TopOpeBRepTool_DrawSegment(P1, P2, SEGMENTCOLOR); -} - -//=========================================================================== -void TopOpeBRepTool_DrawSegment(const gp_Pnt& P, - const gp_Lin& L, - const double Par, - const Draw_ColorKind C) -//=========================================================================== -{ - TopOpeBRepTool_DrawSegment(P, ElCLib::Value(Par, L), C); -} - -//=========================================================================== -Draw_ColorKind TopOpeBRepTool_ColorOnState(const TopAbs_State S) -//=========================================================================== -{ - Draw_ColorKind c; - switch (S) - { - case TopAbs_ON: - c = Draw_blanc; - break; - case TopAbs_UNKNOWN: - c = Draw_rouge; - break; - case TopAbs_IN: - c = Draw_rose; - break; - case TopAbs_OUT: - c = Draw_cyan; - break; - } - return c; -} - -//=========================================================================== -void TopOpeBRepTool_DrawSegment(const gp_Pnt& P, - const gp_Lin& L, - const double Par, - const TopAbs_State S) -//=========================================================================== -{ - TopOpeBRepTool_DrawSegment(P, L, Par, TopOpeBRepTool_ColorOnState(S)); -} - -void TopOpeBRepTool_DrawSegment(const gp_Pnt& P, const gp_Lin& L, const double Par) -{ - TopOpeBRepTool_DrawSegment(P, L, Par, SEGMENTCOLOR); -} - -Standard_EXPORT void FDRAW_DINS(const TCollection_AsciiString pref, - const TopoDS_Shape& SS, - const TCollection_AsciiString Snam, - const TCollection_AsciiString suff) -{ - DBRep::Set(Snam.ToCString(), SS); - std::cout << pref << FUN_tool_PRODINS() << " " << Snam << ";" << suff; -} - -Standard_EXPORT void FDRAW_DINE(const TCollection_AsciiString pref, - const TopoDS_Edge& EE, - const TCollection_AsciiString Enam, - const TCollection_AsciiString suff) -{ - TCollection_AsciiString VFnam, VRnam, VInam, VEnam; - TCollection_AsciiString blancV(" "); - TopoDS_Vertex VF, VR; - TopExp::Vertices(EE, VF, VR); - if (!VF.IsNull() && !VR.IsNull() && !EE.IsNull()) - { - DBRep::Set(Enam.ToCString(), EE); - double f, l; - BRep_Tool::Range(EE, f, l); - std::cout << pref << FUN_tool_PRODINS() << "-gO " << Enam << "; # f,l : " << f << "," << l - << suff; - - #if 0 - int nfo=0,nre=0,nin=0,nex=0; - TopExp_Explorer exx; - for (exx.Init(EE,TopAbs_VERTEX);exx.More();exx.Next()) { -// for (TopExp_Explorer exx(EE,TopAbs_VERTEX);exx.More();exx.Next()) { - const TopoDS_Vertex& vv = TopoDS::Vertex(exx.Current()); - TopAbs_Orientation vvo = vv.Orientation(); - if ( vvo == TopAbs_FORWARD ) { - nfo++; VFnam = Enam + ".vf" + nfo; - DBRep::Set(VFnam.ToCString(),vv); - std::cout<& LOE, - const TCollection_AsciiString str1, - const TCollection_AsciiString str2) -{ - NCollection_List::Iterator it(LOE); - for (int ned = 1; it.More(); it.Next(), ned++) - { - TCollection_AsciiString Enam = str1 + str2 + "." + ned; - FDRAW_DINE(pref, TopoDS::Edge(it.Value()), Enam, "\n"); - } -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const gp_Pnt& p, - const gp_Dir& d) -{ - char* aaa = aa.ToCString(); - occ::handle L = new Geom_Line(p, d); - occ::handle tL = new Geom_TrimmedCurve(L, 0., 1.); - DrawTrSurf::Set(aaa, tL); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const gp_Pnt2d& p, - const gp_Dir2d& d, - const int& i) -{ - TCollection_AsciiString bb(aa); - bb += TCollection_AsciiString(i); - char* aaa = bb.ToCString(); - occ::handle L = new Geom2d_Line(p, d); - occ::handle tL = new Geom2d_TrimmedCurve(L, 0., .5); - DrawTrSurf::Set(aaa, tL); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const gp_Pnt2d& p2d) -{ - char* aaa = aa.ToCString(); - DrawTrSurf::Set(aaa, p2d); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const gp_Pnt& p) -{ - char* aaa = aa.ToCString(); - DrawTrSurf::Set(aaa, p); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c2d) -{ - Draw_Color col(Draw_blanc); - DrawTrSurf_CurveColor(col); - char* aaa = aa.ToCString(); - DrawTrSurf::Set(aaa, c2d); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c2d, - const double f, - const double l) -{ - double tol = 1.e-7; - occ::handle cc2d; - if (std::abs(f) <= tol && std::abs(l) <= tol) - cc2d = c2d; - else - cc2d = new Geom2d_TrimmedCurve(c2d, f, l); - FUN_tool_draw(aa, cc2d); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const occ::handle& C) -{ - char* aaa = aa.ToCString(); - DrawTrSurf::Set(aaa, C); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c, - const double f, - const double l) -{ - double tol = 1.e-7; - occ::handle cc; - if (std::abs(f) <= tol && std::abs(l) <= tol) - cc = c; - else - cc = new Geom_TrimmedCurve(c, f, l); - FUN_tool_draw(aa, cc); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const TopoDS_Shape& s) -{ - char* aaa = aa.ToCString(); - DBRep::Set(aaa, s); -} - -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const TopoDS_Shape& S, - const int is) -{ - TCollection_AsciiString bb(aa); - bb += TCollection_AsciiString(is); - FUN_tool_draw(bb, S); -} - -Standard_EXPORT void FUN_tool_draw(TCollection_AsciiString aa, - const TopoDS_Edge& E, - const TopoDS_Face& F, - const int ie) -{ - if (E.IsNull()) - { - std::cout << "************* null edge\n"; - return; - } - double f, l; - const occ::handle& PC = BRep_Tool::CurveOnSurface(E, F, f, l); - if (PC.IsNull()) - { - std::cout << "************* no curv on surf\n"; - return; - } - TCollection_AsciiString bb(aa); - bb += TCollection_AsciiString(ie); - char* aaa = bb.ToCString(); - - bool coldef = false; - TopExp_Explorer ex(F, TopAbs_EDGE); - Draw_Color col, savecol = DrawTrSurf_CurveColor(Draw_rouge); - for (; ex.More(); ex.Next()) - if (E.IsEqual(ex.Current())) - { - col = DBRep_ColorOrientation(ex.Current().Orientation()); - coldef = true; - break; - } - if (!coldef) - col = DBRep_ColorOrientation(E.Orientation()); - - DrawTrSurf_CurveColor(col); - DrawTrSurf::Set(aaa, new Geom2d_TrimmedCurve(PC, f, l)); -} - -Standard_EXPORT const TCollection_AsciiString& FUN_tool_PRODINS() -{ - static TCollection_AsciiString PRODINS("dins "); - return PRODINS; -} - -Standard_EXPORT const TCollection_AsciiString& FUN_tool_PRODINP() -{ - static TCollection_AsciiString PRODINP("dinp "); - return PRODINP; -} - -#endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.hxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.hxx deleted file mode 100644 index 836c443830..0000000000 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_DRAW.hxx +++ /dev/null @@ -1,108 +0,0 @@ -// Created on: 1994-10-24 -// 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. - -#ifndef _TopOpeBRepTool_DRAW_HeaderFile -#define _TopOpeBRepTool_DRAW_HeaderFile -#ifdef DRAW - - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - -Standard_EXPORT void TopOpeBRepTool_DrawPoint(const gp_Pnt& P, - const Draw_MarkerShape T, - const Draw_ColorKind C); -Standard_EXPORT void TopOpeBRepTool_DrawSegment(const gp_Pnt& P1, - const gp_Pnt& P2, - const Draw_ColorKind C); -Standard_EXPORT void TopOpeBRepTool_DrawSegment(const gp_Pnt& P1, const gp_Pnt& P2); -Standard_EXPORT void TopOpeBRepTool_DrawSegment(const gp_Pnt& P, - const gp_Lin&, - const double Par, - const Draw_ColorKind C); -Standard_EXPORT Draw_ColorKind TopOpeBRepTool_ColorOnState(const TopAbs_State S); -Standard_EXPORT void TopOpeBRepTool_DrawSegment(const gp_Pnt& P, - const gp_Lin& L, - const double Par, - const TopAbs_State S); -Standard_EXPORT void FDRAW_DINS(const TCollection_AsciiString pref, - const TopoDS_Shape& SS, - const TCollection_AsciiString Snam, - const TCollection_AsciiString suff = ""); -Standard_EXPORT void FDRAW_DINE(const TCollection_AsciiString pref, - const TopoDS_Edge& EE, - const TCollection_AsciiString Enam, - const TCollection_AsciiString suff = ""); -Standard_EXPORT void FDRAW_DINLOE(const TCollection_AsciiString pref, - const NCollection_List& LOE, - const TCollection_AsciiString str1, - const TCollection_AsciiString str2); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const gp_Pnt& p, - const gp_Dir& d); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const gp_Pnt2d& p, - const gp_Dir2d& d, - const int& i); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const gp_Pnt2d& p2d); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const gp_Pnt& p); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c2d); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c2d, - const double f, - const double l); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString& aa, - const occ::handle& C); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const occ::handle c, - const double f, - const double l); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, const TopoDS_Shape& s); -Standard_EXPORT void FUN_tool_draw(const TCollection_AsciiString aa, - const TopoDS_Shape& S, - const int is); -Standard_EXPORT void FUN_tool_draw(TCollection_AsciiString aa, - const TopoDS_Edge& E, - const TopoDS_Face& F, - const int ie); -Standard_EXPORT void FUN_tool_draw(TCollection_AsciiString aa, - const TopoDS_Edge& E, - const TopoDS_Face& F, - const int ie); -Standard_EXPORT const TCollection_AsciiString& FUN_tool_PRODINS(); -Standard_EXPORT const TCollection_AsciiString& FUN_tool_PRODINP(); -#endif -#endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx index f2de4fa76b..a51ce47b9b 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_PURGE.cxx @@ -842,12 +842,6 @@ bool TopOpeBRepTool::CorrectONUVISO(const TopoDS_Face& Fin, TopoDS_Face& Fsp) continue; } -#ifdef DRAW - if (trc) { - std::cout<<"TopOpeBRepTool correctONUVISO : faulty iso edge"< mve; TopExp::MapShapesAndAncestors(Fsp,TopAbs_VERTEX,To for (NCollection_List::Iterator itdeg(lfydege);itdeg.More();itdeg.Next()) { TopoDS_Edge& fydege = TopoDS::Edge(itdeg.Value()); -#ifdef DRAW - if (trc) { - std::cout<<"TopOpeBRepTool correctONUVISO : faulty deg edge"< #include -#ifdef DRAW - #include -#endif - #define M_FORWARD(ori) (ori == TopAbs_FORWARD) #define M_REVERSED(ori) (ori == TopAbs_REVERSED) #define M_INTERNAL(ori) (ori == TopAbs_INTERNAL) @@ -73,11 +69,6 @@ static int FUN_adds(const TopoDS_Shape& s) aa = TCollection_AsciiString("e"); is = STATIC_mape.Add(s); } - #ifdef DRAW - bool trc = TopOpeBRepTool_GettraceREGUSO(); - if (trc) - FUN_tool_draw(aa, s, is); - #endif return is; } #endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx index 2cf61e5207..bcad587abb 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_REGUW.cxx @@ -25,10 +25,6 @@ #include #include -#ifdef DRAW - #include -#endif - #define FORWARD (1) #define REVERSED (2) #define INTERNAL (3) @@ -85,11 +81,6 @@ Standard_EXPORT int FUN_adds(const TopoDS_Shape& s) aa = TCollection_AsciiString("f"); is = STATIC_mapf.Add(s); } - #ifdef DRAW - bool trc = TopOpeBRepTool_GettraceREGUFA(); - if (trc) - FUN_tool_draw(aa, s, is); - #endif return is; } #endif diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeS.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeS.cxx index a6e71fb35e..d4fc85acab 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeS.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeS.cxx @@ -14,10 +14,6 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifdef DRAW - #include -#endif - #include #include #include diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx index 0fd6ee6741..4b69b4efac 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_RegularizeW.cxx @@ -24,10 +24,6 @@ #include #include -#ifdef DRAW - #include -#endif - #define SAME (-1) #define DIFF (-2) #define UNKNOWN (0) @@ -58,9 +54,6 @@ static int FUN_adds(const TopoDS_Shape& s) aa = TCollection_AsciiString("fa"); is = STATIC_mapf.Add(s); } - #ifdef DRAW - FUN_tool_draw(aa, s, is); - #endif return is; } diff --git a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx index 0e82ce603b..4f0d1cd0d0 100644 --- a/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx +++ b/src/ModelingAlgorithms/TKBool/TopOpeBRepTool/TopOpeBRepTool_ShapeClassifier.cxx @@ -672,132 +672,3 @@ bool TopOpeBRepTool_ShapeClassifier::HasAvLS() const bool hasavls = (myPAvLS) ? (!myPAvLS->IsEmpty()) : false; return hasavls; } - -#if 0 -//================================================================================================= - -void TopOpeBRepTool_ShapeClassifier::FindEdge(const TopoDS_Shape& S) -{ - myEdge.Nullify(); - bool isavs = (! myAvS.IsNull()); - bool isavls = HasAvLS(); - bool isav = (isavs || isavls); - - if (S.IsNull()) return; - TopAbs_ShapeEnum tS = S.ShapeType(); - - TopExp_Explorer eex; - if ( ! myFace.IsNull() ) eex.Init(myFace,TopAbs_EDGE); - else eex.Init(S,TopAbs_EDGE); - - for(; eex.More(); eex.Next()) { - const TopoDS_Edge& E = TopoDS::Edge(eex.Current()); - if ( isav ) { - bool toavoid = false; - if ( isavls ) toavoid = myMapAvS.Contains(E); - else if ( isavs ) toavoid = E.IsSame(myAvS); - if ( toavoid ) continue; - } - else if ( BRep_Tool::Degenerated(E) ) { - if ( tS != TopAbs_EDGE ) continue; - } - myEdge = E; - break; - } -} - -static bool FindAPointInTheFace -(const TopoDS_Face& _face,gp_Pnt& APoint,double& u,double& v) -{ - TopoDS_Face face=_face; - face.Orientation(TopAbs_FORWARD); - - TopExp_Explorer faceexplorer; - BRepAdaptor_Curve2d c; - gp_Vec2d T; - gp_Pnt2d P; - bool Ok = false; - int nbiter=0; - double myParamOnEdge = 0.5; - do { - nbiter++; - if(myParamOnEdge==0.5) myParamOnEdge = 0.4; - else if(myParamOnEdge==0.4) myParamOnEdge = 0.6; - else if(myParamOnEdge==0.6) myParamOnEdge = 0.3; - else if(myParamOnEdge==0.3) myParamOnEdge = 0.7; - else if(myParamOnEdge==0.7) myParamOnEdge = 0.2; - else if(myParamOnEdge==0.2) myParamOnEdge = 0.8; - else if(myParamOnEdge==0.8) myParamOnEdge = 0.1; - else if(myParamOnEdge==0.1) myParamOnEdge = 0.9; - else { myParamOnEdge*=0.5; } - - for (faceexplorer.Init(face,TopAbs_EDGE); - faceexplorer.More(); - faceexplorer.Next()) { - TopoDS_Edge Edge = TopoDS::Edge(faceexplorer.Current()); - c.Initialize(Edge,face); - int nbinterval = c.NbIntervals(GeomAbs_C1); - c.D1((c.LastParameter() - c.FirstParameter()) * myParamOnEdge + c.FirstParameter(),P,T); - - double x=T.X(); - double y=T.Y(); - //-- std::cout<<"Param:"<<(c.IntervalFirst() + c.IntervalLast()) * param<<" U:"< Edge : "< FClassifier.Parameter()) { - ParamInit = FClassifier.Parameter(); - APointExist = true; - } - } - } - } - if(APointExist) { - ParamInit*=0.5; - u = P.X() + ParamInit* T.X(); - v = P.Y() + ParamInit* T.Y(); - BRepAdaptor_Surface s; - bool computerestriction = false; - s.Initialize(face,computerestriction); - s.D0(u,v,APoint); - //-- std::cout<<" u="< ("< -#endif - #ifdef OCCT_DEBUG extern NCollection_IndexedMap STATIC_PURGE_mapv; extern NCollection_IndexedMap STATIC_PURGE_mapeds; diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx index 1a60768810..64c66ab131 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_CSWalking.cxx @@ -42,9 +42,6 @@ #ifdef OCCT_DEBUG #include #include - #ifdef DRAW - #include - #endif // POP pour NT #include @@ -84,9 +81,6 @@ static void Drawsect(const occ::handle& surf, // char name[100]; char* name = new char[100]; Sprintf(name, "%s_%d", "Section", IndexOfSection); - #ifdef DRAW - DrawTrSurf::Set(name, sect); - #endif } #endif diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx index aac483dca4..b2972fa90b 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_RstRstLineBuilder.cxx @@ -36,9 +36,6 @@ #include #include #include - #ifdef DRAW - #include - #endif static int IndexOfSection = 0; extern bool Blend_GettraceDRAWSECT(); @@ -146,12 +143,6 @@ static void Drawsect(const double param, Blend_RstRstFunction& Func) Func.Section(BP, TP, TP2d, TW); occ::handle sect = new Geom_BSplineCurve(TP, TW, TK, TMul, hd); IndexOfSection++; - #ifdef DRAW - char tname[100]; - const char* name = tname; - Sprintf(name, "%s_%d", "Section", IndexOfSection); - DrawTrSurf::Set(name, sect); - #endif } #endif diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx index 6511abf7f1..ae228e585e 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_SurfRstLineBuilder.cxx @@ -37,9 +37,6 @@ #include #include #include - #ifdef DRAW - #include - #endif static int IndexOfSection = 0; extern bool Blend_GettraceDRAWSECT(); #ifdef OCCT_DEBUG_BBPP_N_TRDERIV @@ -132,12 +129,6 @@ static void Drawsect(const double param, Blend_SurfRstFunction& Func) Func.Section(BP, TP, TP2d, TW); occ::handle sect = new Geom_BSplineCurve(TP, TW, TK, TMul, hd); IndexOfSection++; - #ifdef DRAW - char tname[100]; - const char* name = tname; - Sprintf(name, "%s_%d", "Section", IndexOfSection); - DrawTrSurf::Set(name, sect); - #endif } #endif diff --git a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx index 201962c8ce..03cc22c28f 100644 --- a/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx +++ b/src/ModelingAlgorithms/TKFillet/BRepBlend/BRepBlend_Walking.cxx @@ -47,17 +47,9 @@ #include #include -#ifdef DRAW - #include -#endif - #ifdef OCCT_DEBUG #include #include - #ifdef DRAW - #include - #include - #endif // POP pour NT #include @@ -109,16 +101,6 @@ static void Drawsect(const occ::handle& surf1, IndexOfSection++; Sprintf(name, "%s_%d", "Section", IndexOfSection); } - #ifdef DRAW - occ::handle BS = new (DrawTrSurf_BSplineCurve)(sect); - BS->ClearPoles(); - BS->ClearKnots(); - if (State == Blend_StepTooLarge) - BS->SetColor(Draw_violet); - if (State == Blend_SamePoints) - BS->SetColor(Draw_rose); - Draw::Set(name, BS); - #endif } static void Drawsect(const occ::handle& surf1, @@ -2241,16 +2223,6 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, { line->Prepend(previousP); } -#ifdef DRAW - int nbpts = line->NbPoints(); - char name[100]; - Sprintf(name, "pg%d", nbpts); - DrawTrSurf::Set(name, PtOnGuide); - Sprintf(name, "p1_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS1()); - Sprintf(name, "p2_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS2()); -#endif parprec = param; @@ -2317,16 +2289,6 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, { line->Prepend(previousP); } -#ifdef DRAW - int nbpts = line->NbPoints(); - char name[100]; - Sprintf(name, "pg%d", nbpts); - DrawTrSurf::Set(name, PtOnGuide); - Sprintf(name, "p1_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS1()); - Sprintf(name, "p2_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS2()); -#endif parprec = param; @@ -2364,16 +2326,6 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, { line->Prepend(previousP); } -#ifdef DRAW - int nbpts = line->NbPoints(); - char name[100]; - Sprintf(name, "pg%d", nbpts); - DrawTrSurf::Set(name, PtOnGuide); - Sprintf(name, "p1_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS1()); - Sprintf(name, "p2_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS2()); -#endif MakeExtremity(Ext1, true, Index1, solrst1(1), Isvtx1, Vtx1); // On blinde le cas singulier ou un des recadrage a planter @@ -2400,16 +2352,6 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, { line->Prepend(previousP); } -#ifdef DRAW - int nbpts = line->NbPoints(); - char name[100]; - Sprintf(name, "pg%d", nbpts); - DrawTrSurf::Set(name, PtOnGuide); - Sprintf(name, "p1_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS1()); - Sprintf(name, "p2_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS2()); -#endif // On blinde le cas singulier ou un des recadrage a plante if (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2.0 * tolpoint3d)) @@ -2436,16 +2378,6 @@ void BRepBlend_Walking::InternalPerform(Blend_Function& Func, { line->Prepend(previousP); } -#ifdef DRAW - int nbpts = line->NbPoints(); - char name[100]; - Sprintf(name, "pg%d", nbpts); - DrawTrSurf::Set(name, PtOnGuide); - Sprintf(name, "p1_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS1()); - Sprintf(name, "p2_%d", nbpts); - DrawTrSurf::Set(name, previousP.PointOnS2()); -#endif if ((Isvtx1 != Isvtx2) && (previousP.PointOnS1().IsEqual(previousP.PointOnS2(), 2.0 * tolpoint3d))) diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx index a6609aa67d..6df0cb9c5d 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_6.cxx @@ -80,20 +80,6 @@ #include -// #define DRAW - -#ifdef DRAW - #include - #include - #include - #include - #include - #include - #include - #include -static int IndexOfConge = 0; -#endif - #ifdef OCCT_DEBUG extern bool ChFi3d_GettraceDRAWFIL(); extern bool ChFi3d_GettraceDRAWWALK(); @@ -103,49 +89,6 @@ extern void ChFi3d_SettraceDRAWWALK(const bool b); extern void ChFi3d_SetcontextNOOPT(const bool b); #endif -#ifdef DRAW -static void drawline(const occ::handle& lin, const bool iscs) -{ - occ::handle p3d; - occ::handle p2d; - occ::handle tg3d; - occ::handle tg2d; - - for (int i = 1; i <= lin->NbPoints(); i++) - { - const Blend_Point& pt = lin->Point(i); - gp_Pnt point = pt.PointOnS1(); - gp_Pnt extr = point.Translated(pt.TangentOnS1()); - p3d = new Draw_Marker3D(point, Draw_Square, Draw_rouge); - dout << p3d; - tg3d = new Draw_Segment3D(point, extr, Draw_rouge); - dout << tg3d; - point = pt.PointOnS2(); - extr = point.Translated(pt.TangentOnS2()); - p3d = new Draw_Marker3D(point, Draw_Plus, Draw_jaune); - dout << p3d; - tg3d = new Draw_Segment3D(point, extr, Draw_jaune); - dout << tg3d; - - double u, v; - pt.ParametersOnS1(u, v); - gp_Pnt2d point2d(u, v); - gp_Pnt2d extr2d = point2d.Translated(pt.Tangent2dOnS1()); - p2d = new Draw_Marker2D(point2d, Draw_Square, Draw_rouge); - dout << p2d; - tg2d = new Draw_Segment2D(point2d, extr2d, Draw_rouge); - dout << tg2d; - pt.ParametersOnS2(u, v); - point2d.SetCoord(u, v); - extr2d = point2d.Translated(pt.Tangent2dOnS2()); - p2d = new Draw_Marker2D(point2d, Draw_Plus, Draw_jaune); - dout << p2d; - tg2d = new Draw_Segment2D(point2d, extr2d, Draw_jaune); - dout << tg2d; - dout.Flush(); - } -} -#endif //================================================================================================= static int SearchIndex(const double Value, occ::handle& Lin) @@ -436,17 +379,6 @@ bool ChFi3d_Builder::CompleteData(occ::handle& Data, { TopOpeBRepDS_DataStructure& DStr = myDS->ChangeDS(); Data->ChangeSurf(DStr.AddSurface(TopOpeBRepDS_Surface(Surfcoin, tolapp3d))); -#ifdef DRAW - ChFi3d_SettraceDRAWFIL(true); - if (ChFi3d_GettraceDRAWFIL()) - { - IndexOfConge++; - // char name[100]; - char* name = new char[100]; - Sprintf(name, "%s_%d", "Surf", IndexOfConge); - DrawTrSurf::Set(name, Surfcoin); - } -#endif double UFirst, ULast, VFirst, VLast; Surfcoin->Bounds(UFirst, ULast, VFirst, VLast); @@ -749,17 +681,6 @@ bool ChFi3d_Builder::StoreData(occ::handle& Data, Data->ChangeSurf(DStr.AddSurface(TopOpeBRepDS_Surface(Surf, tolget3d))); -#ifdef DRAW - ChFi3d_SettraceDRAWFIL(true); - if (ChFi3d_GettraceDRAWFIL()) - { - IndexOfConge++; - // char name[100]; - char* name = new char[100]; - Sprintf(name, "%s_%d", "Surf", IndexOfConge); - DrawTrSurf::Set(name, Surf); - } -#endif double UFirst, ULast, VFirst, VLast, pppdeb, pppfin; Surf->Bounds(UFirst, ULast, VFirst, VLast); BRepAdaptor_Curve2d brc; @@ -1153,11 +1074,6 @@ bool ChFi3d_Builder::ComputeData(occ::handle& Data, again = 2; } } -#ifdef DRAW - ChFi3d_SettraceDRAWWALK(true); - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, true); -#endif if (Forward) Decroch = TheWalk.DecrochEnd(); else @@ -1321,11 +1237,6 @@ bool ChFi3d_Builder::ComputeData(occ::handle& Data, again = 2; } } -#ifdef DRAW - ChFi3d_SettraceDRAWWALK(true); - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, true); -#endif if (Forward) { Decroch1 = TheWalk.Decroch1End(); @@ -1485,11 +1396,6 @@ bool ChFi3d_Builder::SimulData(occ::handle& /*Data*/, again = 2; } } -#ifdef DRAW - ChFi3d_SettraceDRAWWALK(true); - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, true); -#endif if (Forward) Decroch = TheWalk.DecrochEnd(); else @@ -1649,10 +1555,6 @@ bool ChFi3d_Builder::SimulData(occ::handle& /*Data*/, again = 2; } } -#ifdef DRAW - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, true); -#endif if (Forward) { Decroch1 = TheWalk.Decroch1End(); @@ -2292,10 +2194,6 @@ bool ChFi3d_Builder::ComputeData(occ::handle& Data, } } Nbpnt = Lin->NbPoints(); -#ifdef DRAW - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, false); -#endif First = Lin->Point(1).Parameter(); Last = Lin->Point(Nbpnt).Parameter(); @@ -2625,10 +2523,6 @@ bool ChFi3d_Builder::SimulData(occ::handle& /*Data*/, again = 3; } } -#ifdef DRAW - if (ChFi3d_GettraceDRAWWALK()) - drawline(Lin, false); -#endif First = Lin->Point(1).Parameter(); Last = Lin->Point(Nbpnt).Parameter(); return true; diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_C1.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_C1.cxx index 87c9feb3df..707ada938b 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_C1.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Builder_C1.cxx @@ -99,10 +99,6 @@ #include #ifdef OCCT_DEBUG - #ifdef DRAW - #include - #include - #endif // DRAW // Modified by Sergey KHROMOV - Thu Apr 11 12:23:40 2002 Begin // The method // ChFi3d_Builder::PerformMoreSurfdata(const int Index) diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx index 1c74565425..dfc3879b08 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_Debug.cxx @@ -32,10 +32,6 @@ #include #include -#ifdef DRAW - #include -#endif - #ifdef OCCT_DEBUG #include OSD_Chronometer simul, elspine, chemine; @@ -262,9 +258,6 @@ Standard_EXPORT void ChFi3d_ResultChron(OSD_Chronometer& ch, double& time) // purpose : function allows to trace SurfData to check // construction of all elements, namely pcurves //============================================================== -#ifdef DRAW -static int NbSD = 0; -#endif void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr, const occ::handle& Data) { @@ -364,12 +357,5 @@ void ChFi3d_CheckSurfData(const TopOpeBRepDS_DataStructure& DStr, W.Orientation(TopAbs_FORWARD); B.Add(F, W); - -#ifdef DRAW - // char name[100]; - char* name = new char[100]; - Sprintf(name, "fillet_%d", NbSD++); - DBRep::Set(name, F); -#endif } } diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C2.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C2.cxx index 979addc08a..88ddf99cf0 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C2.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C2.cxx @@ -64,9 +64,6 @@ #include #include -#ifdef DRAW - #include -#endif #ifdef OCCT_DEBUG #include extern bool ChFi3d_GettraceDRAWSPINE(); @@ -934,15 +931,6 @@ void ChFi3d_FilBuilder::PerformTwoCorner(const int Index) Bfac = ChFi3d_mkbound(HBRFopsam, pcFopsam, tolapp3d, 2.e-4); GeomFill_ConstrainedFilling fil(8, 20); fil.Init(Bsam, Bdif, Bfac, true); -#if 0 - for(int ib = 0; ib < 4; ib++){ - if(ib == 2) continue; - fil.CheckCoonsAlgPatch(ib); - fil.CheckTgteField(ib); - fil.CheckApprox(ib); - fil.CheckResult(ib); - } -#endif occ::handle Surfcoin = fil.Surface(); TopAbs_Orientation Osurfsam = sdsam->Orientation(); occ::handle pcnul; diff --git a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C3.cxx b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C3.cxx index dc7b09322b..ba5b4deb37 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C3.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFi3d/ChFi3d_FilBuilder_C3.cxx @@ -59,9 +59,6 @@ #include #include -#ifdef DRAW - #include -#endif #ifdef OCCT_DEBUG #include extern bool ChFi3d_GettraceDRAWSPINE(); diff --git a/src/ModelingAlgorithms/TKFillet/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx b/src/ModelingAlgorithms/TKFillet/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx index 369de52851..7bf8718e61 100644 --- a/src/ModelingAlgorithms/TKFillet/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx +++ b/src/ModelingAlgorithms/TKFillet/ChFiKPart/ChFiKPart_ComputeData_Fcts.cxx @@ -106,20 +106,6 @@ void ChFiKPart_ProjPC(const GeomAdaptor_Curve& Cg, } } break; -#if 0 - NCollection_Array1 TP(1,Projc.NbPoles()); - if (Projc.IsRational()) { - NCollection_Array1 TW(1,Projc.NbPoles()); - Projc.PolesAndWeights(TP,TW); - Pcurv = new Geom2d_BezierCurve(TP,TW); - } - else { - Projc.Poles(TP); - Pcurv = new Geom2d_BezierCurve(TP); - } - } - break; -#endif case GeomAbs_BSplineCurve: { occ::handle BspProjc = Projc.BSpline(); NCollection_Array1 TP(1, BspProjc->NbPoles()); @@ -142,23 +128,6 @@ void ChFiKPart_ProjPC(const GeomAdaptor_Curve& Cg, } } break; -#if 0 - NCollection_Array1 TP(1,Projc.NbPoles()); - NCollection_Array1 TK(1,Projc.NbKnots()); - NCollection_Array1 TM(1,Projc.NbKnots()); - Projc.KnotsAndMultiplicities(TK,TM); - if (Projc.IsRational()) { - NCollection_Array1 TW(1,Projc.NbPoles()); - Projc.PolesAndWeights(TP,TW); - Pcurv = new Geom2d_BSplineCurve(TP,TW,TK,TM,Projc.Degree()); - } - else { - Projc.Poles(TP); - Pcurv = new Geom2d_BSplineCurve(TP,TK,TM,Projc.Degree()); - } - } - break; -#endif default: throw Standard_NotImplemented("failed approximation of the pcurve "); } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx b/src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx index a57bf0ff76..aeae8746e6 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/Geom2dGcc/Geom2dGcc_FunctionTanCuCuCu.cxx @@ -269,253 +269,10 @@ bool Geom2dGcc_FunctionTanCuCuCu::Value(const math_Vector& X, math_Vector& Fval) bool Geom2dGcc_FunctionTanCuCuCu::Derivatives(const math_Vector&, math_Matrix&) { -#if 0 - gp_Pnt2d Point1; - gp_Pnt2d Point2; - gp_Pnt2d Point3; - gp_Vec2d Tan1; - gp_Vec2d Tan2; - gp_Vec2d Tan3; - gp_Vec2d D21; - gp_Vec2d D22; - gp_Vec2d D23; - InitDerivative(X,Point1,Point2,Point3,Tan1,Tan2,Tan3,D21,D22,D23); - //derivees premieres non normees Deriv1ui. - gp_XY Deriv1u1(Tan1.XY()); - gp_XY Deriv1u2(Tan2.XY()); - gp_XY Deriv1u3(Tan3.XY()); - //pipj (normes) et PiPj (non Normes). - gp_XY P1P2(gp_Vec2d(Point1,Point2).XY()); - gp_XY P2P3(gp_Vec2d(Point2,Point3).XY()); - gp_XY P3P1(gp_Vec2d(Point3,Point1).XY()); - double NorP1P2 = P1P2.Modulus(); - double NorP2P3 = P2P3.Modulus(); - double NorP3P1 = P3P1.Modulus(); - gp_XY p1p2,p2p3,p3p1; - if (NorP1P2 >= gp::Resolution()) { p1p2 = P1P2/NorP1P2; } - else { p1p2 = gp_XY(0.,0.); } - if (NorP2P3 >= gp::Resolution()) { p2p3 = P2P3/NorP2P3; } - else { p2p3 = gp_XY(0.,0.); } - if (NorP3P1 >= gp::Resolution()) { p3p1 = P3P1/NorP3P1; } - else { p3p1 = gp_XY(0.,0.); } - //normales au courbes normees Nori et non nromees nori et norme des nori. - double nnor1 = Deriv1u1.Modulus(); - double nnor2 = Deriv1u2.Modulus(); - double nnor3 = Deriv1u3.Modulus(); - gp_XY Nor1(-Deriv1u1.Y(),Deriv1u1.X()); - gp_XY Nor2(-Deriv1u2.Y(),Deriv1u2.X()); - gp_XY Nor3(-Deriv1u3.Y(),Deriv1u3.X()); - gp_XY nor1,nor2,nor3; - if (nnor1 >= gp::Resolution()) { nor1 = Nor1/nnor1; } - else { nor1 = gp_XY(0.,0.); } - if (nnor2 >= gp::Resolution()) { nor2 = Nor2/nnor2; } - else { nor2 = gp_XY(0.,0.); } - if (nnor3 >= gp::Resolution()) { nor3 = Nor3/nnor3; } - else { nor3 = gp_XY(0.,0.); } - //derivees des normales. - gp_XY NorD21,NorD22,NorD23; - NorD21 = gp_XY(-D21.Y(),D21.X()); - NorD22 = gp_XY(-D22.Y(),D22.X()); - NorD23 = gp_XY(-D23.Y(),D23.X()); - //determination des signes pour les produits scalaires. - double signe1 = 1.; - double signe2 = 1.; - double signe3 = 1.; - gp_XY P = Point1.XY(); - P += Point2.XY(); - P += Point3.XY(); - P /= 3.; - gp_Pnt2d Pcenter(P); - gp_XY fic1 = Pcenter.XY(); - fic1 -= Point1.XY(); - gp_XY fic2 = Pcenter.XY(); - fic2 -= Point2.XY(); - gp_XY fic3 = Pcenter.XY(); - fic3 -= Point3.XY(); - double pscal11 = nor1.Dot(fic1); - double pscal22 = nor2.Dot(fic2); - double pscal33 = nor3.Dot(fic3); - if (pscal11 <= 0.) { signe1 = -1; } - if (pscal22 <= 0.) { signe2 = -1; } - if (pscal33 <= 0.) { signe3 = -1; } - - // Derivees dFui/uj 1 <= ui <= 3 , 1 <= uj <= 3 - // ============================================= - double partie1,partie2; - if (nnor1 <= gp::Resolution()) { partie1 = 0.; } - else { partie1 = (signe1*NorD21/nnor1-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1)) - *Nor1).Dot(p1p2); } - if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((Deriv1u1.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2-Deriv1u1/NorP1P2) - .Dot(signe1*nor1+signe2*nor2); } - Deriv(1,1) = partie1 + partie2; - if (nnor2 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=(signe2*NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2)) - *Nor2).Dot(p1p2); } - if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; } - else{partie2=((-Deriv1u2.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2+Deriv1u2/NorP1P2) - .Dot(signe1*nor1+signe2*nor2); } - Deriv(1,2) = partie1 + partie2; - Deriv(1,3) = 0.; - Deriv(2,1) = 0.; - if (nnor2 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=(signe2*NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2)) - *Nor2).Dot(p2p3); } - if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; } - else { partie2=((Deriv1u2.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3-Deriv1u2/NorP2P3) - .Dot(signe2*nor2+signe3*nor3); } - Deriv(2,2) = partie1 +partie2; - if (nnor3 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=(signe3*NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3)) - *Nor3).Dot(p2p3); } - if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((-Deriv1u3.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3+Deriv1u3/NorP2P3) - .Dot(signe2*nor2+signe3*nor3); } - Deriv(2,3) = partie1 + partie2; - if (nnor1 <= gp::Resolution()) { partie1 = 0.; } - else { partie1 =(signe1*NorD21/(nnor1)-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1)) - *Nor1).Dot(p3p1); } - if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((-Deriv1u1.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1+Deriv1u1/NorP3P1) - .Dot(signe1*nor1+signe3*nor3); } - Deriv(3,1) = partie1 + partie2; - Deriv(3,2) = 0.; - if (nnor3 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=(signe3*NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3)) - *Nor3).Dot(p3p1); } - if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((Deriv1u3.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1-Deriv1u3/NorP3P1) - .Dot(signe1*nor1+signe3*nor3); } - Deriv(3,3) = partie1+partie2; -#endif return true; } bool Geom2dGcc_FunctionTanCuCuCu::Values(const math_Vector&, math_Vector&, math_Matrix&) { -#if 0 - gp_Pnt2d Point1; - gp_Pnt2d Point2; - gp_Pnt2d Point3; - gp_Vec2d Tan1; - gp_Vec2d Tan2; - gp_Vec2d Tan3; - gp_Vec2d D21; - gp_Vec2d D22; - gp_Vec2d D23; - InitDerivative(X,Point1,Point2,Point3,Tan1,Tan2,Tan3,D21,D22,D23); - //derivees premieres non normees Deriv1ui. - gp_XY Deriv1u1(Tan1.XY()); - gp_XY Deriv1u2(Tan2.XY()); - gp_XY Deriv1u3(Tan3.XY()); - //pipj (normes) et PiPj (non Normes). - gp_XY P1P2(gp_Vec2d(Point1,Point2).XY()); - gp_XY P2P3(gp_Vec2d(Point2,Point3).XY()); - gp_XY P3P1(gp_Vec2d(Point3,Point1).XY()); - double NorP1P2 = P1P2.Modulus(); - double NorP2P3 = P2P3.Modulus(); - double NorP3P1 = P3P1.Modulus(); - gp_XY p1p2,p2p3,p3p1; - if (NorP1P2 >= gp::Resolution()) { p1p2 = P1P2/NorP1P2; } - else { p1p2 = gp_XY(0.,0.); } - if (NorP2P3 >= gp::Resolution()) { p2p3 = P2P3/NorP2P3; } - else { p2p3 = gp_XY(0.,0.); } - if (NorP3P1 >= gp::Resolution()) { p3p1 = P3P1/NorP3P1; } - else { p3p1 = gp_XY(0.,0.); } - //normales au courbes normees Nori et non nromees nori et norme des nori. - double nnor1 = Deriv1u1.Modulus(); - double nnor2 = Deriv1u2.Modulus(); - double nnor3 = Deriv1u3.Modulus(); - gp_XY Nor1(-Deriv1u1.Y(),Deriv1u1.X()); - gp_XY Nor2(-Deriv1u2.Y(),Deriv1u2.X()); - gp_XY Nor3(-Deriv1u3.Y(),Deriv1u3.X()); - gp_XY nor1,nor2,nor3; - if (nnor1 >= gp::Resolution()) { nor1 = Nor1/nnor1; } - else { nor1 = gp_XY(0.,0.); } - if (nnor2 >= gp::Resolution()) { nor2 = Nor2/nnor2; } - else { nor2 = gp_XY(0.,0.); } - if (nnor3 >= gp::Resolution()) { nor3 = Nor3/nnor3; } - else { nor3 = gp_XY(0.,0.); } - //derivees des normales. - gp_XY NorD21,NorD22,NorD23; - NorD21 = gp_XY(-D21.Y(),D21.X()); - NorD22 = gp_XY(-D22.Y(),D22.X()); - NorD23 = gp_XY(-D23.Y(),D23.X()); - //determination des signes pour les produits scalaires. - double signe1 = 1.; - double signe2 = 1.; - double signe3 = 1.; - gp_XY P = Point1.XY(); - P += Point2.XY(); - P += Point3.XY(); - P /= 3.; - gp_Pnt2d Pcenter(P); - gp_XY fic1 = Pcenter.XY(); - fic1 -= Point1.XY(); - gp_XY fic2 = Pcenter.XY(); - fic2 -= Point2.XY(); - gp_XY fic3 = Pcenter.XY(); - fic3 -= Point3.XY(); - double pscal11 = nor1.Dot(fic1); - double pscal22 = nor2.Dot(fic2); - double pscal33 = nor3.Dot(fic3); - if (pscal11 <= 0.) { signe1 = -1; } - if (pscal22 <= 0.) { signe2 = -1; } - if (pscal33 <= 0.) { signe3 = -1; } - - // Fonctions Fui. - // ============== - Fval(1) = signe1*nor1.Dot(p1p2)+signe2*nor2.Dot(p1p2); - Fval(2) = signe2*nor2.Dot(p2p3)+signe3*nor3.Dot(p2p3); - Fval(3) = signe3*nor3.Dot(p3p1)+signe1*nor1.Dot(p3p1); - // Derivees dFui/uj 1 <= ui <= 3 , 1 <= uj <= 3 - // ============================================= - double partie1,partie2; - if (nnor1 <= gp::Resolution()) { partie1 = 0.; } - else { partie1 = signe1*(NorD21/nnor1-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1)) - *Nor1).Dot(p1p2); } - if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((Deriv1u1.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2-Deriv1u1/NorP1P2) - .Dot(signe1*nor1+signe2*nor2); } - Deriv(1,1) = partie1 + partie2; - if (nnor2 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=signe2*(NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2)) - *Nor2).Dot(p1p2); } - if (NorP1P2 <= gp::Resolution()) { partie2 = 0.; } - else{partie2=((-Deriv1u2.Dot(p1p2)/(NorP1P2*NorP1P2))*P1P2+Deriv1u2/NorP1P2) - .Dot(signe1*nor1+signe2*nor2); } - Deriv(1,2) = partie1 + partie2; - Deriv(1,3) = 0.; - Deriv(2,1) = 0.; - if (nnor2 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=signe2*(NorD22/(nnor2)-(Nor2.Dot(NorD22)/(nnor2*nnor2*nnor2)) - *Nor2).Dot(p2p3); } - if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; } - else { partie2=((Deriv1u2.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3-Deriv1u2/NorP2P3) - .Dot(signe2*nor2+signe3*nor3); } - Deriv(2,2) = partie1 +partie2; - if (nnor3 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=signe3*(NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3)) - *Nor3).Dot(p2p3); } - if (NorP2P3 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((-Deriv1u3.Dot(p2p3)/(NorP2P3*NorP2P3))*P2P3+Deriv1u3/NorP2P3) - .Dot(signe2*nor2+signe3*nor3); } - Deriv(2,3) = partie1 + partie2; - if (nnor1 <= gp::Resolution()) { partie1 = 0.; } - else { partie1 =signe1*(NorD21/(nnor1)-(Nor1.Dot(NorD21)/(nnor1*nnor1*nnor1)) - *Nor1).Dot(p3p1); } - if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((-Deriv1u1.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1+Deriv1u1/NorP3P1) - .Dot(signe1*nor1+signe3*nor3); } - Deriv(3,1) = partie1 + partie2; - Deriv(3,2) = 0.; - if (nnor3 <= gp::Resolution()) { partie1 = 0.; } - else { partie1=signe3*(NorD23/(nnor3)-(Nor3.Dot(NorD23)/(nnor3*nnor3*nnor3)) - *Nor3).Dot(p3p1); } - if (NorP3P1 <= gp::Resolution()) { partie2 = 0.; } - else {partie2=((Deriv1u3.Dot(p3p1)/(NorP3P1*NorP3P1))*P3P1-Deriv1u3/NorP3P1) - .Dot(signe1*nor1+signe3*nor3); } - Deriv(3,3) = partie1+partie2; -#endif return true; } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/Geom2dHatch/Geom2dHatch_Elements.cxx b/src/ModelingAlgorithms/TKGeomAlgo/Geom2dHatch/Geom2dHatch_Elements.cxx index ebf09930ca..91a459641c 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/Geom2dHatch/Geom2dHatch_Elements.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/Geom2dHatch/Geom2dHatch_Elements.cxx @@ -227,11 +227,6 @@ void Geom2dHatch_Elements::CurrentEdge(Geom2dAdaptor_Curve& E, TopAbs_Orientatio E = Item.ChangeCurve(); Or = Item.Orientation(); -#if 0 - E.Edge() = TopoDS::Edge(myEExplorer.Current()); - E.Face() = myFace; - Or = E.Edge().Orientation(); -#endif } //================================================================================================= diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx index c94f51f97f..8e6afb91e8 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CircularBlendFunc.cxx @@ -26,13 +26,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CircularBlendFunc, Approx_SweepFunction) -#ifdef DRAW - #include - #include - #include -static int NbSections = 0; -#endif - static const double TolAng = 1.e-6; static GeomAbs_Shape GeomFillNextShape(const GeomAbs_Shape S) @@ -293,12 +286,6 @@ bool GeomFill_CircularBlendFunc::D0(const double Param, // Section GeomFill::GetCircle(myTConv, ns1, ns2, nplan, P1, P2, myRadius, Center, Poles, Weigths); -#ifdef DRAW -// occ::handle BS = -// new Geom_BSplineCurve(Poles,Weights,Knots,Mults,Degree); -// Sprintf(name,"SECT_%d",NbSections++); -// DrawTrSurf::Set(name,BS); -#endif return true; } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_ConstrainedFilling.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_ConstrainedFilling.cxx index 5f6406ae8b..42ec53a3d8 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_ConstrainedFilling.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_ConstrainedFilling.cxx @@ -35,19 +35,6 @@ #include #include -#ifdef DRAW - // Pour le dessin. - #include - #include - #include - #include - #include - #include - #include - #include -static bool dodraw = 0; -static double drawfac = 0.1; -#endif #ifdef OCCT_DEBUG Standard_IMPORT void Law_draw1dcurve(const NCollection_Array1& pol, const NCollection_Array1& knots, @@ -306,10 +293,6 @@ static void killcorners(const int nb, { occ::handle bs = Law::ScaleCub(0., 1., fnul, lnul, fscal, lscal); tga[i]->Scale(bs); -#ifdef DRAW - if (dodraw) - Law_draw1dcurve(bs, gp_Vec2d(1., 0.), 1.); -#endif } } } @@ -976,29 +959,6 @@ void GeomFill_ConstrainedFilling::MatchKnots() pq[1] = Law::MixTgt(degree[0], nk[0]->Array1(), nm[0]->Array1(), false, ind[1]); pq[3] = Law::MixTgt(degree[0], nk[0]->Array1(), nm[0]->Array1(), true, ind[3]); - -#ifdef DRAW - if (dodraw) - { - gp_Vec2d tra(0., 0.); - double scal = 1.; - Law_draw1dcurve(ab[0]->Array1(), nk[1]->Array1(), nm[1]->Array1(), degree[1], tra, scal); - tra.SetCoord(1., 0.); - Law_draw1dcurve(ab[1]->Array1(), nk[0]->Array1(), nm[0]->Array1(), degree[0], tra, scal); - tra.SetCoord(0., 1.); - Law_draw1dcurve(ab[2]->Array1(), nk[1]->Array1(), nm[1]->Array1(), degree[1], tra, scal); - tra.SetCoord(1., 1.); - Law_draw1dcurve(ab[3]->Array1(), nk[0]->Array1(), nm[0]->Array1(), degree[0], tra, scal); - tra.SetCoord(0., 0.); - Law_draw1dcurve(pq[0]->Array1(), nk[1]->Array1(), nm[1]->Array1(), degree[1], tra, scal); - tra.SetCoord(0., 1.); - Law_draw1dcurve(pq[2]->Array1(), nk[1]->Array1(), nm[1]->Array1(), degree[1], tra, scal); - tra.SetCoord(1., 0.); - Law_draw1dcurve(pq[1]->Array1(), nk[0]->Array1(), nm[0]->Array1(), degree[0], tra, scal); - tra.SetCoord(1., 1.); - Law_draw1dcurve(pq[3]->Array1(), nk[0]->Array1(), nm[0]->Array1(), degree[0], tra, scal); - } -#endif } //================================================================================================= @@ -1468,13 +1428,6 @@ void GeomFill_ConstrainedFilling::CheckCoonsAlgPatch(const int I) vptch = ptch->D1U(uu, vv); else vptch = ptch->D1V(uu, vv); -#ifdef DRAW - gp_Pnt pp; - occ::handle seg; - pp = pbound.Translated(vptch); - seg = new Draw_Segment3D(pbound, pp, Draw_jaune); - dout << seg; -#endif uu += duu; vv += dvv; ww += dww; @@ -1487,11 +1440,7 @@ void GeomFill_ConstrainedFilling::CheckTgteField(const int I) { if (tgalg[I].IsNull()) return; -#ifdef DRAW - gp_Pnt p1, p2; -#else - gp_Pnt p1; -#endif + gp_Pnt p1; gp_Vec d1; bool caplisse = false; double maxang = 0., pmix = 0, pmixcur; @@ -1512,18 +1461,6 @@ void GeomFill_ConstrainedFilling::CheckTgteField(const int I) if (pmix * pmixcur < 0.) caplisse = true; } -#ifdef DRAW - occ::handle seg; - p2 = p1.Translated(vtg); - seg = new Draw_Segment3D(p1, p2, Draw_blanc); - dout << seg; - p2 = p1.Translated(vnor); - seg = new Draw_Segment3D(p1, p2, Draw_rouge); - dout << seg; - p2 = p1.Translated(vcros); - seg = new Draw_Segment3D(p1, p2, Draw_jaune); - dout << seg; -#endif if (vnor.Magnitude() > 1.e-15 && vtg.Magnitude() > 1.e-15) { double alpha = std::abs(M_PI / 2. - std::abs(vnor.Angle(vtg))); @@ -1579,16 +1516,6 @@ void GeomFill_ConstrainedFilling::CheckApprox(const int I) if (std::abs(alpha) > maxang) maxang = std::abs(alpha); } -#ifdef DRAW - occ::handle seg; - gp_Pnt pp; - pp = pbound.Translated(vbound); - seg = new Draw_Segment3D(pbound, pp, Draw_blanc); - dout << seg; - pp = papp.Translated(vapp); - seg = new Draw_Segment3D(papp, pp, Draw_rouge); - dout << seg; -#endif } if (papp.Distance(pbound) > maxdist) maxdist = papp.Distance(pbound); @@ -1637,12 +1564,8 @@ void GeomFill_ConstrainedFilling::CheckResult(const int I) duu = 0.; break; } - gp_Pnt pbound[31], pres[31]; - gp_Vec vbound[31], vres[31]; -#ifdef DRAW - double ang[31]; - bool hasang[31]; -#endif + gp_Pnt pbound[31], pres[31]; + gp_Vec vbound[31], vres[31]; occ::handle bou = ptch->Bound(I); int k; for (k = 0; k <= 30; k++) @@ -1662,15 +1585,7 @@ void GeomFill_ConstrainedFilling::CheckResult(const int I) alpha = std::min(alpha, std::abs(M_PI - alpha)); if (alpha > maxang) maxang = alpha; -#ifdef DRAW - ang[k] = alpha; - hasang[k] = 1; -#endif } -#ifdef DRAW - else - hasang[k] = 0; -#endif } if (pres[k].Distance(pbound[k]) > maxdist) maxdist = pres[k].Distance(pbound[k]); @@ -1685,29 +1600,4 @@ void GeomFill_ConstrainedFilling::CheckResult(const int I) double angdeg = maxang * 180. / M_PI; std::cout << "Angle max : " << angdeg << " deg" << std::endl; } -#ifdef DRAW - bool scale = maxang > 1.e-10; - for (k = 0; k <= 30; k++) - { - if (hasang[k]) - { - gp_Pnt pp; - occ::handle seg; - vbound[k].Normalize(); - if (scale) - vbound[k].Multiply(1. + 3. * ang[k] / maxang); - vbound[k].Multiply(drawfac); - pp = pbound[k].Translated(vbound[k]); - seg = new Draw_Segment3D(pbound[k], pp, Draw_blanc); - dout << seg; - vres[k].Normalize(); - if (scale) - vres[k].Multiply(1. + 3. * ang[k] / maxang); - vres[k].Multiply(drawfac); - pp = pres[k].Translated(vres[k]); - seg = new Draw_Segment3D(pres[k], pp, Draw_rouge); - dout << seg; - } - } -#endif } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx index ee212b9430..754d6bf643 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_CorrectedFrenet.cxx @@ -50,51 +50,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_CorrectedFrenet, GeomFill_TrihedronLaw) static bool Affich = 0; #endif -#ifdef DRAW -static int CorrNumber = 0; - #include - #include - #include - // #include - #include -#endif - -#ifdef DRAW -static void draw(const occ::handle& law) -{ - double Step, u, v, tmin; - int NbInt, i, j, jmax; - NbInt = law->NbIntervals(GeomAbs_C3); - NCollection_Array1 Int(1, NbInt + 1); - law->Intervals(Int, GeomAbs_C3); - gp_Pnt2d old; - occ::handle tg2d; - - for (i = 1; i <= NbInt; i++) - { - tmin = Int(i); - Step = (Int(i + 1) - Int(i)) / 4; - if (i == NbInt) - jmax = 4; - else - jmax = 3; - for (j = 1; j <= jmax; j++) - { - u = tmin + (j - 1) * Step; - v = law->Value(u); - gp_Pnt2d point2d(u, v); - if ((i > 1) || (j > 1)) - { - tg2d = new Draw_Segment2D(old, point2d, Draw_kaki); - dout << tg2d; - } - old = point2d; - } - } - dout.Flush(); -} -#endif - static double ComputeTorsion(const double Param, const occ::handle& aCurve) { double Torsion; @@ -403,35 +358,6 @@ void GeomFill_CorrectedFrenet::Init() // double StartAng = 0, AvStep, Step, t; double StartAng = 0, AvStep, Step; -#ifdef DRAW - double t; - - if (Affich) - { // Display the curve C'^C''(t) - GeomFill_SnglrFunc CS(myCurve); - NbStep = 99; - AvStep = (myTrimmed->LastParameter() - myTrimmed->FirstParameter()) / NbStep; - NCollection_Array1 TabP(1, NbStep + 1); - - NCollection_Array1 TI(1, NbStep + 1); - NCollection_Array1 M(1, NbStep + 1); - M.Init(1); - M(1) = M(NbStep + 1) = 2; - for (i = 1; i <= NbStep + 1; i++) - { - t = (myTrimmed->FirstParameter() + (i - 1) * AvStep); - CS.D0(t, TabP(i)); - TI(i) = t; - } - char tname[100]; - const char* name = tname; - Sprintf(name, "Binorm_%d", ++CorrNumber); - occ::handle BS = new (Geom_BSplineCurve)(TabP, TI, M, 1); - // DrawTrSurf::Set(&name[0], BS); - DrawTrSurf::Set(name, BS); - } -#endif - NbStep = 10; AvStep = (myTrimmed->LastParameter() - myTrimmed->FirstParameter()) / NbStep; for (i = 1; i <= NbI; i++) @@ -477,13 +403,6 @@ void GeomFill_CorrectedFrenet::Init() HArrNormal->ChangeValue(i) = SeqNormal(i); }; } - -#ifdef DRAW - if (Affich) - { - draw(EvolAroundT); - } -#endif } //=============================================================== diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx index 1b6daf157a..a4907bc2bb 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_EvolvedSection.cxx @@ -31,13 +31,6 @@ #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_EvolvedSection, GeomFill_SectionLaw) -#ifdef DRAW - #include - #include -static int NumSec = 0; -static bool Affich = 0; -#endif - GeomFill_EvolvedSection::GeomFill_EvolvedSection(const occ::handle& C, const occ::handle& L) { @@ -55,15 +48,6 @@ GeomFill_EvolvedSection::GeomFill_EvolvedSection(const occ::handle& myCurve->RemoveKnot(1, M, Precision::Confusion()); } } - -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "UnifSect_%d", ++NumSec); - DrawTrSurf::Set(name, myCurve); - } -#endif } //======================================================= diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_GuideTrihedronPlan.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_GuideTrihedronPlan.cxx index 25603b10a6..7c6bc2c895 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_GuideTrihedronPlan.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_GuideTrihedronPlan.cxx @@ -38,19 +38,11 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_GuideTrihedronPlan, GeomFill_TrihedronWithGu // #include // #include -#ifdef DRAW - #include -#endif #ifdef OCCT_DEBUG static void TracePlan(const occ::handle& /*Plan*/) { std::cout << "Pas d'intersection Guide/Plan" << std::endl; - #if DRAW - char* Temp = "ThePlan"; - DrawTrSurf::Set(Temp, Plan); - // DrawTrSurf::Set("ThePlan", Plan); - #endif } #endif diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_LocationGuide.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_LocationGuide.cxx index 6283d164a2..fedc882c21 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_LocationGuide.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_LocationGuide.cxx @@ -55,12 +55,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_LocationGuide, GeomFill_LocationLaw) -#ifdef DRAW -static int Affich = 0; - #include - #include -#endif - //======================================================================= // function : TraceRevol // purpose : Trace la surface de revolution (Debug) @@ -126,11 +120,6 @@ static void TraceRevol(const double t, // Surface de revolution occ::handle Revol = new (Geom_SurfaceOfRevolution)(S, Ax); std::cout << "Surf Revol at parameter t = " << t << std::endl; - - #if DRAW - const char* aName = "TheRevol"; - DrawTrSurf::Set(aName, Revol); - #endif } #endif @@ -184,18 +173,6 @@ GeomFill_LocationGuide::GeomFill_LocationGuide( OrigParam2 = 1; // et guide pas meme sens de parcourt Trans.SetIdentity(); WithTrans = false; - -#ifdef DRAW - if (Affich) - { - Approx_Curve3d approx(myGuide, 1.e-4, GeomAbs_C1, 15 + myGuide->NbIntervals(GeomAbs_CN), 14); - if (approx.HasResult()) - { - const char* aName = "TheGuide"; - DrawTrSurf::Set(aName, approx.Curve()); - } - } -#endif } //================================================================== diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx index 0fd1b7bdc6..be0f874134 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_NSections.cxx @@ -46,9 +46,6 @@ IMPLEMENT_STANDARD_RTTIEXT(GeomFill_NSections, GeomFill_SectionLaw) #ifdef OCCT_DEBUG - #ifdef DRAW - #include - #endif static bool Affich = 0; static int NbSurf = 0; #endif @@ -676,14 +673,6 @@ void GeomFill_NSections::ComputeSurface() NbSurf++; if (Affich) { - #ifdef DRAW - char name[256]; - Sprintf(name, "NS_Surf_%d", NbSurf); - DrawTrSurf::Set(name, BS); - std::cout << std::endl - << "RESULTAT de ComputeSurface : NS_Surf_" << NbSurf << std::endl - << std::endl; - #endif } #endif } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx index 1f440bff68..bdc2a42232 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_Pipe.cxx @@ -76,10 +76,6 @@ static bool Affich = false; static int NbSections = 0; #endif -#ifdef DRAW - #include -#endif - static bool CheckSense(const NCollection_Sequence>& Seq1, NCollection_Sequence>& Seq2) { @@ -388,15 +384,6 @@ void GeomFill_Pipe::Init(const occ::handle& Path, myAdpPath->FirstParameter(), myAdpPath->LastParameter()); -#ifdef DRAW - if (Affich) - { - char* Temp = "TheSect"; - DrawTrSurf::Set(Temp, FirstSect); - // DrawTrSurf::Set("TheSect", FirstSect ); - } -#endif - if (rotat) TheLoc->Set(mySec, rotat, myAdpPath->FirstParameter(), myAdpPath->LastParameter(), 0., angle); myLoc = TheLoc; @@ -436,15 +423,6 @@ void GeomFill_Pipe::Init(const occ::handle& Path, const double Radiu occ::handle TLaw = new (GeomFill_CorrectedFrenet)(); myLoc = new (GeomFill_CurveAndTrihedron)(TLaw); myLoc->SetCurve(myAdpPath); - -#ifdef DRAW - if (Affich) - { - char* Temp = "TheSect"; - DrawTrSurf::Set(Temp, C); - // DrawTrSurf::Set("TheSect", C); - } -#endif } //================================================================================================= @@ -554,14 +532,6 @@ void GeomFill_Pipe::Init(const occ::handle& Path, param = Place.ParameterOnPath(); Sect = Place.Section(false); -#ifdef DRAW - if (Affich) - { - char* Temp = "TheSect"; - DrawTrSurf::Set(Temp, Sect); - // DrawTrSurf::Set("TheSect",Sect); - } -#endif mySec = new (GeomFill_UniformSection)(Sect, Path->FirstParameter(), Path->LastParameter()); } } @@ -586,14 +556,6 @@ void GeomFill_Pipe::Init(const occ::handle& Path, Place.Perform(myAdpPath, Precision::Confusion()); Sect = Place.Section(false); -#ifdef DRAW - if (Affich) - { - char* temp = "TheSect"; - DrawTrSurf::Set(temp, Sect); - // DrawTrSurf::Set("TheSect",Sect); - } -#endif mySec = new (GeomFill_UniformSection)(Sect, myAdpPath->FirstParameter(), myAdpPath->LastParameter()); } @@ -618,14 +580,6 @@ void GeomFill_Pipe::Init(const occ::handle& Path, Place.Perform(Precision::Confusion()); Sect = Place.Section(false); -#ifdef DRAW - if (Affich) - { - char* temp = "TheSect"; - DrawTrSurf::Set(temp, Sect); - // DrawTrSurf::Set("TheSect",Sect); - } -#endif mySec = new (GeomFill_UniformSection)(Sect, Path->FirstParameter(), Path->LastParameter()); } @@ -1052,11 +1006,6 @@ void GeomFill_Pipe::ApproxSurf(const bool WithParameters) Section.Section(i, Poles, Poles2d, Weights); occ::handle BS = new Geom_BSplineCurve(Poles, Weights, Knots, Mults, Degree); - #ifdef DRAW - char name[256]; - Sprintf(name, "SECT_%d", NbSections); - DrawTrSurf::Set(name, BS); - #endif } } #endif @@ -1089,11 +1038,6 @@ void GeomFill_Pipe::ApproxSurf(const bool WithParameters) Section.Section(i, Poles, Poles2d, Weights); occ::handle BS = new Geom_BSplineCurve(Poles, Weights, Knots, Mults, Degree); - #ifdef DRAW - char name[256]; - Sprintf(name, "sect_%d", i); - DrawTrSurf::Set(name, BS); - #endif } #endif // throw StdFail_NotDone("Pipe : App not done"); diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx index d44a78a662..ed66bae5f1 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_SweepSectionGenerator.cxx @@ -35,12 +35,6 @@ #include #include -#ifdef DRAW - #include - #include -static bool Affich = false; -static int NbSECTIONS = 0; -#endif //================================================================================================= @@ -556,14 +550,6 @@ void GeomFill_SweepSectionGenerator::Section(const int P, for (int i = 1; i <= Poles.Length(); i++) Poles(i).Transform(cumulTR); } -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "SECTION_%d", ++NbSECTIONS); - DrawTrSurf::Set(name, myFirstSect->Transformed(cumulTR)); - } -#endif } else { @@ -644,15 +630,6 @@ void GeomFill_SweepSectionGenerator::Section(const int P, else BS = GeomConvert::CurveToBSplineCurve(CT, Convert_QuasiAngular); -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "SECTION_%d", ++NbSECTIONS); - DrawTrSurf::Set(name, BS); - } -#endif - BS->Poles(Poles); BS->Weights(Weigths); } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx index aa5c903a4d..4433c75ddf 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomFill/GeomFill_UniformSection.cxx @@ -32,12 +32,6 @@ #include IMPLEMENT_STANDARD_RTTIEXT(GeomFill_UniformSection, GeomFill_SectionLaw) -#ifdef DRAW - #include -static int NumSec = 0; -static bool Affich = 0; -#endif - GeomFill_UniformSection::GeomFill_UniformSection(const occ::handle& C, const double FirstParameter, const double LastParameter) @@ -55,15 +49,6 @@ GeomFill_UniformSection::GeomFill_UniformSection(const occ::handle& myCurve->RemoveKnot(1, M, Precision::Confusion()); } } - -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "UnifSect_%d", ++NumSec); - DrawTrSurf::Set(name, myCurve); - } -#endif } //======================================================= diff --git a/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx b/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx index 6e8b598525..3c6c564d67 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/GeomPlate/GeomPlate_BuildPlateSurface.cxx @@ -64,21 +64,6 @@ #include -#ifdef DRAW - #include - #include - #include - #include -// 0 : No display -// 1 : Display of Geometries and intermediary control -// 2 : Display of the number of constraints by curve + Intersection -// 3 : Dump of constraints in Plate -static int NbPlan = 0; -// static int NbCurv2d = 0; -static int NbMark = 0; -static int NbProj = 0; -#endif - #ifdef OCCT_DEBUG #include static int Affich = 0; @@ -294,14 +279,6 @@ occ::handle GeomPlate_BuildPlateSurface::ProjectCurve( Curve2d = appr.Curve2d(); } -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "proj_%d", ++NbProj); - DrawTrSurf::Set(name, Curve2d); - } -#endif return Curve2d; } @@ -1688,14 +1665,6 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t if (!myIsLinear) { myPlanarSurfInit = mySurfInit; -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "planinit_%d", NbPlan + 1); - DrawTrSurf::Set(name, mySurfInit); - } -#endif double u1, v1, u2, v2; mySurfInit->Bounds(u1, v1, u2, v2); GeomAdaptor_Surface Surf(mySurfInit); @@ -1783,15 +1752,6 @@ void GeomPlate_BuildPlateSurface::ComputeSurfInit(const Message_ProgressRange& t myLinCont->ChangeValue(i)->SetCurve2dOnSurf(NullCurve); } } - -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "surfinit_%d", ++NbPlan); - DrawTrSurf::Set(name, mySurfInit); - } -#endif } //--------------------------------------------------------- @@ -2007,15 +1967,6 @@ void GeomPlate_BuildPlateSurface::Intersect( #ifdef OCCT_DEBUG std::cout << "Attention: Two points 3d have the same projection dist = " << Dist << std::endl; -#endif -#ifdef DRAW - if (Affich > 1) - { - occ::handle mark = new (Draw_Marker3D)(P1, Draw_X, Draw_vert); - char name[256]; - Sprintf(name, "mark_%d", ++NbMark); - Draw::Set(name, mark); - } #endif } } @@ -2506,30 +2457,6 @@ bool GeomPlate_BuildPlateSurface::VerifSurface(const int NbBoucle) diffDistMax = diffDist; // SdiffDist+=diffDist; NdiffDist++; -#ifdef DRAW - if ((Affich) && (NbBoucle == myNbIter)) - { - gp_Pnt P; - gp_Pnt2d P2d; - LinCont->D0(U, P); - occ::handle mark = new (Draw_Marker3D)(P, Draw_X, Draw_orange); - char name[256]; - Sprintf(name, "mark_%d", ++NbMark); - Draw::Set(name, mark); - if (!LinCont->ProjectedCurve().IsNull()) - P2d = LinCont->ProjectedCurve()->Value(U); - else - { - if (!LinCont->Curve2dOnSurf().IsNull()) - P2d = LinCont->Curve2dOnSurf()->Value(U); - else - P2d = ProjectPoint(P); - } - Sprintf(name, "mark2d_%d", ++NbMark); - occ::handle mark2d = new (Draw_Marker2D)(P2d, Draw_X, Draw_orange); - Draw::Set(name, mark2d); - } -#endif } else if ((diffAng > 0) && (LinCont->Order() == 1)) { @@ -2538,17 +2465,6 @@ bool GeomPlate_BuildPlateSurface::VerifSurface(const int NbBoucle) diffAngMax = diffAng; // SdiffAng+=diffAng; NdiffAng++; -#ifdef DRAW - if ((Affich) && (NbBoucle == myNbIter)) - { - gp_Pnt P; - LinCont->D0(U, P); - occ::handle mark = new Draw_Marker3D(P, Draw_X, Draw_or); - char name[256]; - Sprintf(name, "mark_%d", ++NbMark); - Draw::Set(name, mark); - } -#endif } } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic_1.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic_1.cxx index 4860bb5889..eedeef5b85 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic_1.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntCurve/IntCurve_IntConicConic_1.cxx @@ -397,22 +397,8 @@ void ProjectOnLAndIntersectWithLDomain(const gp_Circ2d& Circle, LInterAndDomain.Binf = Linf; LInterAndDomain.Bsup = Lsup; -#if 0 - double Cinf = - ElCLib::CircleParameter(Circle.Axis() - ,ElCLib::LineValue(LInterAndDomain.Binf, - Line.Position())); - double Csup = - ElCLib::CircleParameter(Circle.Axis() - ,ElCLib::LineValue(LInterAndDomain.Bsup - ,Line.Position())); - - if(CinfCDomainAndRes.Bsup) Csup = CDomainAndRes.Bsup; -#else double Cinf = CDomainAndRes.Binf; double Csup = CDomainAndRes.Bsup; -#endif if (Cinf >= Csup) { Cinf = CDomainAndRes.Binf; @@ -534,16 +520,6 @@ void LineCircleGeometricIntersection(const gp_Lin2d& Line, double dAngle1 = (Circle.XAxis().Direction()).Angle(Line.Direction()); -#if 0 - //--------------------------------------------- - //-- Si le cercle est indirect alors l origine - //-- est vue en -dAngle1. - //-- - if(Circle.IsDirect() == false) { - dAngle1 = -dAngle1; - } -#endif - double a, b, c, d; Line.Coefficients(a, b, c); @@ -2334,19 +2310,6 @@ void IntCurve_IntConicConic::Perform(const gp_Lin2d& Line, SolutionLine[i].Binf = SolutionLine[i].Bsup = t; } } -#if 0 - if(NbSolTotal == 2) { - if(SolutionLine[0].Binf==SolutionLine[0].BSup) { - if(SolutionLine[1].Binf==SolutionLine[1].BSup) { - if(std::abs(SolutionLine[0].Binf-SolutionLine[1].Binf) (%g , %g)\n", - SolutionCircle[i].Binf,SolutionCircle[i].Bsup,p1,p2); - } -#endif SolutionCircle[i].Binf = p1; SolutionCircle[i].Bsup = p2; diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.cxx index 1d28ac6336..e38d4b9a3f 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntCurveSurface/IntCurveSurface_ThePolygonOfHInter.cxx @@ -113,30 +113,4 @@ double IntCurveSurface_ThePolygonOfHInter::ApproxParamOnCurve(const int Index //================================================================================================== -void IntCurveSurface_ThePolygonOfHInter::Dump() const -{ -#if 0 - static int Compteur=0; - char tamp[100]; - Compteur++; - Sprintf(tamp,"Poly%d",Compteur); - std::cout<<" @@@@@@@@@@@ F i c h i e r : "< %f \n",Binf,Bsup); - fprintf(fp,"\npol %d %d %f",Compteur,NbPntIn,TheDeflection); - gp_Pnt p1,p2; - for (int iObje=1; iObje<=NbSegments(); iObje++) { - p1=BeginOfSeg(iObje); - fprintf(fp,"\npnt %d %f %f",Compteur,p1.X(),p1.Y()); - } - p1=EndOfSeg(NbSegments()); - fprintf(fp,"\npnt %d %f %f",Compteur,p1.X(),p1.Y()); - fprintf(fp,"\ndispol %d\n#\n",Compteur); - fclose(fp); -#endif -} +void IntCurveSurface_ThePolygonOfHInter::Dump() const {} diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntImp/IntImp_ComputeTangence.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntImp/IntImp_ComputeTangence.cxx index bb9e18d36a..3db03ace5a 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntImp/IntImp_ComputeTangence.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntImp/IntImp_ComputeTangence.cxx @@ -161,30 +161,6 @@ bool IntImp_ComputeTangence(const gp_Vec DPuv[], } } } while (!triOk); - -#if 0 - // trier par ordre croissant le tableau NormDuv - int II; - for (j =0;j<=3;j++) Irang[j]=j; - for (j =0;j<=3;j++) { - Tampon = NormDuv[j]; - II=j; - for (i =j+1;i<=3;i++) { - if (NormDuv[i] < Tampon) { - Tampon = NormDuv[i]; - II = i; - } - } - Irang[j] = Irang[II]; - Irang[II] = j; - NormDuv[II] = NormDuv[j]; - NormDuv[j] = Tampon; - } - for (j=0; j<=3;j++) - { - TabIso[j] = staticChoixRef[Irang[j]]; - } -#endif } return tangent; } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ALine.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ALine.cxx index 430d4ca4ee..57c81b7fd5 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ALine.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ALine.cxx @@ -71,157 +71,7 @@ const IntAna_Curve& IntPatch_ALine::Curve() const void IntPatch_ALine::AddVertex(const IntPatch_Point& VTXj) { -#if 0 - int n = NbVertex(); - if(n>=1) { - double par = VTXj.ParameterOnLine(); - - for(int i=1; i<=n ;i++) { - const IntPatch_Point& VTXi = svtx.Value(i); - if((VTXj.IsOnDomS1()==false) && (VTXj.IsOnDomS2()==false)) { - if((VTXi.IsOnDomS1()==false) && (VTXi.IsOnDomS2()==false)) { - if(std::abs(par-VTXi.ParameterOnLine())<=PCONFUSION) { - #if DEBUG - std::cout<<" Rejet IntPatch_ALine::AddVertex (0) "< RIEN "<Value(aPrm)); - std::cout << "vertex v" << ii << " " << aPP.X() << " " << aPP.Y() << " " << aPP.Z() << std::endl; - - Sprintf(name, "p%d_%d", ii, ind); - Draw::Set(name, aPP); - } - std::cout << " --- DUMP ALine (end) -----" << std::endl; - } - } - - //Copy all output information and apply it as a TCL-code in DRAW. - - //After that, use TCL-script below: - - /* ********************************* Script (begin) - shape ww w - copy v1 vprev - for {set i 2} {$i <= 10000} {incr i} { - distmini dd vprev v$i; - - if { [dval dd_val] > 1.0e-7} { - edge ee vprev v$i; - add ee ww; - copy v$i vprev; - } - } - ********************************** Script (end) */ -#endif - // The same points can be marked by different vertices. // The code below unifies tolerances of all vertices // marking the same points. @@ -1022,19 +975,6 @@ bool IntPatch_ALineToWLine::StepComputing(const occ::handle& the const double aR = IntPatch_PointLine::CurvatureRadiusOfIntersLine(myS1, myS2, thePOn2S); -#if 0 - { - static int zzz = 0; - zzz++; - std::cout << "*** R" << zzz << " (begin)" << std::endl; - double aU1, aV1, aU2, aV2; - thePOn2S.Parameters(aU1, aV1, aU2, aV2); - std::cout << "Prms: " << aU1 << ", " << aV1 << ", " << aU2 << ", " << aV2 << std::endl; - std::cout << "Radius = " << aR << std::endl; - std::cout << "*** R" << zzz << " (end)" << std::endl; - } -#endif - if (aR < 0.0) { return false; diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ImpImpIntersection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ImpImpIntersection.cxx index 591c69d910..d9fd05b031 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ImpImpIntersection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_ImpImpIntersection.cxx @@ -488,14 +488,12 @@ void PutPointsOnLine(const occ::handle& goon = true; if (multpoint) { -#if 1 Normale = QuadSurf.Normale(Psurf); // Normale a la surface au point currentarc = currentpointonrst.Arc(); currentparameter = currentpointonrst.Parameter(); currentarc->D1(currentparameter, p2d, d2d); QuadSurf.D1(p2d.X(), p2d.Y(), ptbid, d1u, d1v); Vtgrst.SetLinearForm(d2d.X(), d1u, d2d.Y(), d1v); -#endif goon = MultiplePoint(listpnt, Domain, QuadSurf, @@ -564,14 +562,12 @@ void PutPointsOnLine(const occ::handle& aVertTol); if (linefound) { -#if 1 Normale = QuadSurf.Normale(Psurf); // Normale a la surface au point currentarc = currentpointonrst.Arc(); //-- currentparameter = currentpointonrst.Parameter(); currentarc->D1(currentparameter, p2d, d2d); QuadSurf.D1(p2d.X(), p2d.Y(), ptbid, d1u, d1v); Vtgrst.SetLinearForm(d2d.X(), d1u, d2d.Y(), d1v); -#endif const occ::handle& lin = slin.Value(linenumber); TheType = lin->ArcType(); @@ -1183,18 +1179,6 @@ bool FindLine(gp_Pnt& Psurf, } break; case IntPatch_Parabola: { -#if 0 - para = ElCLib::Parameter(Handle(IntPatch_GLine)::DownCast (lin)->Parabola(),Psurf); - if (para <= upper && para >= lower) { - pt = ElCLib::Value(para,Handle(IntPatch_GLine)::DownCast (lin)->Parabola()); - dist = Psurf.Distance(pt); - if (dist< distmin) { - distmin = dist; - Paraint = para; - Range = i; - } - } -#else //-- Le calcul du parametre sur une parabole est mal fait ds ElCLib. Il ne tient pas compte //-- de la meilleure facon de calculer (axe X ou axe Y). Bilan : Si la parabole est tres //-- pointue (focal de l'ordre de 1e-2 et si le point est a un parametre grand, ca foire. ) @@ -1240,8 +1224,6 @@ bool FindLine(gp_Pnt& Psurf, } } while (++amelioration < 5); } - -#endif } break; case IntPatch_Hyperbola: { diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PointLine.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PointLine.cxx index 88bd4a12d0..9c4c98071d 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PointLine.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PointLine.cxx @@ -63,59 +63,6 @@ double IntPatch_PointLine::CurvatureRadiusOfIntersLine(const occ::handleD2(aU1, aV1, aPt, aDU1, aDV1, aDUU1, aDVV1, aDUV1); theS2->D2(aU2, aV2, aPt, aDU2, aDV2, aDUU2, aDVV2, aDUV2); -#if 0 - //The code in this block contains TEST CASES for - //this algorithm only. It is stupedly to create OCCT-test for - //the method, which will be changed possibly never. - //However, if we do something in this method we can check its - //functionality easily. For that: - // 1. Initialize aTestID variable by the correct value; - // 2. Compile this test code fragment. - - int aTestID = 0; - double anExpectedSqRad = -1.0; - switch(aTestID) - { - case 1: - //Intersection between two spherical surfaces: O1(0.0, 0.0, 0.0), R1 = 3 - //and O2(5.0, 0.0, 0.0), R2 = 5.0. - //Considered point has coordinates: (0.9, 0.0, 0.3*sqrt(91.0)). - - aDU1.SetCoord(0.00000000000000000, 0.90000000000000002, 0.00000000000000000); - aDV1.SetCoord(-2.8618176042508372, 0.00000000000000000, 0.90000000000000002); - aDUU1.SetCoord(-0.90000000000000002, 0.00000000000000000, 0.00000000000000000); - aDUV1.SetCoord(0.00000000000000000, -2.8618176042508372, 0.00000000000000000); - aDVV1.SetCoord(-0.90000000000000002, 0.00000000000000000, -2.8618176042508372); - aDU2.SetCoord(0.00000000000000000, -4.0999999999999996, 0.00000000000000000); - aDV2.SetCoord(-2.8618176042508372, 0.00000000000000000, -4.0999999999999996); - aDUU2.SetCoord(4.0999999999999996, 0.00000000000000000, 0.00000000000000000); - aDUV2.SetCoord(0.00000000000000000, -2.8618176042508372, 0.00000000000000000); - aDVV2.SetCoord(4.0999999999999996, 0.00000000000000000, -2.8618176042508372); - anExpectedSqRad = 819.0/100.0; - break; - case 2: - //Intersection between spherical surfaces: O1(0.0, 0.0, 0.0), R1 = 10 - //and the plane 3*x+4*y+z=26. - //Considered point has coordinates: (-1.68, 5.76, 8.0). - - aDU1.SetCoord(-5.76, -1.68, 0.0); - aDV1.SetCoord(2.24, -7.68, 6.0); - aDUU1.SetCoord(1.68, -5.76, 0.0); - aDUV1.SetCoord(7.68, 2.24, 0.0); - aDVV1.SetCoord(1.68, -5.76, -8.0); - aDU2.SetCoord(1.0, 0.0, -3.0); - aDV2.SetCoord(0.0, 1.0, -4.0); - aDUU2.SetCoord(0.0, 0.0, 0.0); - aDUV2.SetCoord(0.0, 0.0, 0.0); - aDVV2.SetCoord(0.0, 0.0, 0.0); - anExpectedSqRad = 74.0; - break; - default: - aTestID = 0; - break; - } -#endif - const gp_Vec aN1(aDU1.Crossed(aDV1)), aN2(aDU2.Crossed(aDV2)); // Tangent vector to the intersection curve const gp_Vec aCTan(aN1.Crossed(aN2)); @@ -190,20 +137,5 @@ double IntPatch_PointLine::CurvatureRadiusOfIntersLine(const occ::handle svtx.Value(i).ParameterOnLine()) { - SortIsOK = false; - svtx.Exchange(i,i-1); - if(fipt) { - if(indf == i) indf = i-1; - else if(indf == (i-1)) indf = i; - } - if(lapt) { - if(indl == i) indl = i-1; - else if(indl == (i-1)) indl = i; - } - } - } - } - while(!SortIsOK); -#endif } void IntPatch_RLine::Dump(const int theMode) const diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_SpecPntType.hxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_SpecPntType.hxx index eb14585843..e9d3239251 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_SpecPntType.hxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_SpecPntType.hxx @@ -31,4 +31,4 @@ enum IntPatch_SpecPntType IntPatch_SPntPole }; -#endif // _IntPatch_SpecPntType_HeaderFile \ No newline at end of file +#endif // _IntPatch_SpecPntType_HeaderFile diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntRes2d/IntRes2d_Intersection.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntRes2d/IntRes2d_Intersection.cxx index a61c635fd7..b878b96bda 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntRes2d/IntRes2d_Intersection.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntRes2d/IntRes2d_Intersection.cxx @@ -445,24 +445,3 @@ void InternalVerifyPosition(IntRes2d_Transition& T1, } //---------------------------------------------------------------------- - -#if 0 -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - #define Debug(q) std::cout << "IntRes2d_Intersectionq =" << q << std::endl; - -char *DebugPos(const IntRes2d_Position P); - -Debug(FirstParam1); -Debug(LastParam1); -Debug(FirstParam2); -Debug(LastParam2); -Debug(PParamOnFirst); -Debug(PParamOnSecond); -std::cout<<" ##### T1 <> Middle ###### "<0.0000001) { - TFirst.SetValue(false,IntSurf_In); - TSecond.SetValue(false,IntSurf_Out); - } - else if(yu<-0.0000001) { - TFirst.SetValue(false,IntSurf_Out); - TSecond.SetValue(false,IntSurf_In); - } - else { - TFirst.SetValue(true,IntSurf_Undecided); - TSecond.SetValue(true,IntSurf_Undecided); - } - -#else TFirst.SetValue(true, IntSurf_Undecided); TSecond.SetValue(true, IntSurf_Undecided); - -#endif } } } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_PWalking.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_PWalking.cxx index d7ec0ace94..85502cefec 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_PWalking.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntWalk/IntWalk_PWalking.cxx @@ -3121,12 +3121,6 @@ void IntWalk_PWalking::RepartirOuDiviser(bool& DejaReparti, tgfirst = tglast; tglast = false; ChoixIso = choixIsoSav; -#if 0 - pasuv[0]=pasSav[0]; - pasuv[1]=pasSav[1]; - pasuv[2]=pasSav[2]; - pasuv[3]=pasSav[3]; -#else double u1, v1, u2, v2; double U1, V1, U2, V2; int nn = line->NbPoints(); @@ -3139,7 +3133,6 @@ void IntWalk_PWalking::RepartirOuDiviser(bool& DejaReparti, pasuv[2] = std::abs(u2 - U2); pasuv[3] = std::abs(v2 - V2); } -#endif } } else @@ -3171,12 +3164,6 @@ void IntWalk_PWalking::RepartirOuDiviser(bool& DejaReparti, tglast = false; ChoixIso = choixIsoSav; -#if 0 - pasuv[0]=pasSav[0]; - pasuv[1]=pasSav[1]; - pasuv[2]=pasSav[2]; - pasuv[3]=pasSav[3]; -#else double u1, v1, u2, v2; double U1, V1, U2, V2; int nn = line->NbPoints(); @@ -3189,7 +3176,6 @@ void IntWalk_PWalking::RepartirOuDiviser(bool& DejaReparti, pasuv[2] = std::abs(u2 - U2); pasuv[3] = std::abs(v2 - V2); } -#endif } else Arrive = true; diff --git a/src/ModelingAlgorithms/TKGeomAlgo/Intf/Intf_InterferencePolygon2d.cxx b/src/ModelingAlgorithms/TKGeomAlgo/Intf/Intf_InterferencePolygon2d.cxx index 1caae3c41d..cda6d2efbb 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/Intf/Intf_InterferencePolygon2d.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/Intf/Intf_InterferencePolygon2d.cxx @@ -740,18 +740,7 @@ void Intf_InterferencePolygon2d::Intersect(const int iObje1, parTSP, sinTeta)); - int nbtz = myTZones.Length(); -#if 0 - int decaltz=0; - for (int ltz=1; ltz<=nbtz; ltz++) { - if (TheTZ.HasCommonRange(myTZones(ltz-decaltz))) { - TheTZ.Append(myTZones(ltz-decaltz)); - myTZones.Remove(ltz-decaltz); - decaltz++; - } - } - myTZones.Append(TheTZ); -#else + int nbtz = myTZones.Length(); NCollection_List LIndex; for (int ltz = 1; ltz <= nbtz; ltz++) { @@ -782,6 +771,5 @@ void Intf_InterferencePolygon2d::Intersect(const int iObje1, decal++; } } -#endif } } diff --git a/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_BSpline.cxx b/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_BSpline.cxx index 906655cba3..bc899b1c57 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_BSpline.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_BSpline.cxx @@ -568,211 +568,6 @@ bool Law_BSpline::RemoveKnot(const int Index, const int M, const double Toleranc //---------------------------------------------------------------------- //---------------------------------------------------------------------- -#if 0 - ---- methodes otees du CDL -> spec trop vagues : on ne sait pas ou rajouter -le noeud - -//================================================================================================= - -void Law_BSpline::InsertPoleAfter -(const int Index, - const double& P) -{ - InsertPoleAfter(Index,P,1.); -} - -//================================================================================================= - -void Law_BSpline::InsertPoleAfter -(const int Index, - const double& P, - const double Weight) -{ - if (Index < 0 || Index > poles->Length()) throw Standard_OutOfRange(); - - if (Weight <= gp::Resolution()) throw Standard_ConstructionError(); - - - // find the spans which are modified with the inserting pole - // --> evaluate NewKnot & KnotIndex : Value of the new knot to insert. - int KnotIndex, k, sigma; - double NewKnot; - - if (periodic) { - sigma = 0; - k = 1; - while ( sigma < Index) { - sigma += mults->Value(k); - k++; - } - KnotIndex = k - 1; - NewKnot = ( knots->Value(KnotIndex) + knots->Value(KnotIndex+1)) / 2.; - } - else { - sigma = 0; - k = 1; - while ( sigma < Index) { - sigma += mults->Value(k); - k++; - } - int first = k - 1; - sigma -= Index; - while ( sigma < (deg+1)) { - sigma += mults->Value(k); - k++; - } - int last = k - 1; - - KnotIndex = first + (( last - first) / 2); - NewKnot = ( knots->Value(KnotIndex) + knots->Value(KnotIndex+1)) / 2.; - } - - int nbknots = knots->Length(); - occ::handle> nknots = - new NCollection_HArray1(1,nbknots+1); - NCollection_Array1& newknots = nknots->ChangeArray1(); - occ::handle> nmults = - new NCollection_HArray1(1,nbknots+1); - NCollection_Array1& newmults = nmults->ChangeArray1(); - - // insert the knot - - int i; - for ( i = 1; i<= KnotIndex; i++) { - newknots(i) = knots->Value(i); - newmults(i) = mults->Value(i); - } - newknots(KnotIndex+1) = NewKnot; - newmults(KnotIndex+1) = 1; - for ( i = KnotIndex+1; i <= nbknots; i++) { - newknots(i+1) = knots->Value(i); - newmults(i+1) = mults->Value(i); - } - - int nbpoles = poles->Length(); - occ::handle> npoles = - new NCollection_HArray1(1,nbpoles+1); - NCollection_Array1& newpoles = npoles->ChangeArray1(); - - // insert the pole - - for (i = 1; i <= Index; i++) - newpoles(i) = poles->Value(i); - - newpoles(Index+1) = P; - - for (i = Index+1; i <= nbpoles; i++) - newpoles(i+1) = poles->Value(i); - - // insert the weight - - occ::handle> nweights; - bool rat = IsRational() || std::abs(Weight-1.) > gp::Resolution(); - - if (rat) { - nweights = new NCollection_HArray1(1,nbpoles+1); - NCollection_Array1& newweights = nweights->ChangeArray1(); - - for (i = 1; i <= Index; i++) - if (IsRational()) - newweights(i) = weights->Value(i); - else - newweights(i) = 1.; - - newweights(Index+1) = Weight; - - for (i = Index+1; i <= nbpoles; i++) - if (IsRational()) - newweights(i+1) = weights->Value(i); - else - newweights(i+1) = 1.; - } - - poles = npoles; - weights = nweights; - knots = nknots; - mults = nmults; - UpdateKnots(); -} - -//================================================================================================= - -void Law_BSpline::InsertPoleBefore -(const int Index, - const double& P ) -{ - InsertPoleAfter(Index-1,P,1.); -} - -//================================================================================================= - -void Law_BSpline::InsertPoleBefore -(const int Index, - const double& P, - const double Weight) -{ - InsertPoleAfter(Index-1,P,Weight); -} - -//================================================================================================= - -void Law_BSpline::RemovePole -(const int Index) -{ - if (Index < 1 || Index > poles->Length()) throw Standard_OutOfRange(); - - if (poles->Length() <= 2) throw Standard_ConstructionError(); - - if (knotSet == GeomAbs_NonUniform || knotSet == GeomAbs_PiecewiseBezier) - throw Standard_ConstructionError(); - - int i; - occ::handle> nknots = - new NCollection_HArray1(1,knots->Length()-1); - NCollection_Array1& newknots = nknots->ChangeArray1(); - - occ::handle> nmults = - new NCollection_HArray1(1,mults->Length()-1); - NCollection_Array1& newmults = nmults->ChangeArray1(); - - for (i = 1; i < newknots.Length(); i++) { - newknots (i) = knots->Value (i); - newmults (i) = 1; - } - newmults(1) = mults->Value(1); - newknots(newknots.Upper()) = knots->Value (knots->Upper()); - newmults(newmults.Upper()) = mults->Value (mults->Upper()); - - - occ::handle> npoles = - new NCollection_HArray1(1, poles->Upper()-1); - NCollection_Array1& newpoles = npoles->ChangeArray1(); - - for (i = 1; i < Index; i++) - newpoles(i) = poles->Value(i); - for (i = Index; i < newpoles.Length(); i++) - newpoles(i) = poles->Value(i+1); - - occ::handle> nweights; - if (IsRational()) { - nweights = new NCollection_HArray1(1,newpoles.Length()); - NCollection_Array1& newweights = nweights->ChangeArray1(); - for (i = 1; i < Index; i++) - newweights(i) = weights->Value(i); - for (i = Index; i < newweights.Length(); i++) - newweights(i) = weights->Value(i+1); - } - - poles = npoles; - weights = nweights; - knots = nknots; - mults = nmults; - UpdateKnots(); -} - -#endif - //================================================================================================= void Law_BSpline::Reverse() diff --git a/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_Interpol.cxx b/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_Interpol.cxx index 1d83ca106a..9f9e4034c0 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_Interpol.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/Law/Law_Interpol.cxx @@ -25,71 +25,6 @@ IMPLEMENT_STANDARD_RTTIEXT(Law_Interpol, Law_BSpFunc) #ifdef OCCT_DEBUG - #ifdef DRAW - - // Pour le dessin. - #include - #include - #include - #include - #include - #include - #include - #include - -static void Law_draw1dcurve(const occ::handle& bs, - const gp_Vec2d& tra, - const double scal) -{ - NCollection_Array1 pol(1, bs->NbPoles()); - bs->Poles(pol); - NCollection_Array1 knots(1, bs->NbKnots()); - bs->Knots(knots); - NCollection_Array1 mults(1, bs->NbKnots()); - bs->Multiplicities(mults); - int deg = bs->Degree(); - int nbk = knots.Length(); - - occ::handle mar; - gp_Pnt2d pp(knots(1), scal * bs->Value(knots(1))); - pp.Translate(tra); - gp_Pnt2d qq; - mar = new Draw_Marker2D(pp, Draw_Square, Draw_cyan); - dout << mar; - occ::handle seg; - for (int i = 1; i < nbk; i++) - { - double f = knots(i); - double l = knots(i + 1); - for (int iu = 1; iu <= 30; iu++) - { - double uu = iu / 30.; - uu = f + uu * (l - f); - qq.SetCoord(uu, scal * bs->Value(uu)); - qq.Translate(tra); - seg = new Draw_Segment2D(pp, qq, Draw_jaune); - dout << seg; - pp = qq; - } - mar = new Draw_Marker2D(pp, Draw_Square, Draw_cyan); - dout << mar; - } -} - -static void Law_draw1dcurve(const NCollection_Array1& pol, - const NCollection_Array1& knots, - const NCollection_Array1& mults, - const int deg, - const gp_Vec2d& tra, - const double scal) -{ - occ::handle bs = new Law_BSpline(pol, knots, mults, deg); - Law_draw1dcurve(bs, tra, scal); -} - -static bool Affich = 0; - - #endif #endif //================================================================================================= @@ -122,13 +57,6 @@ void Law_Interpol::Set(const NCollection_Array1& ParAndRad, const bool inter.Perform(); SetCurve(inter.Curve()); #ifdef OCCT_DEBUG - #ifdef DRAW - if (Affich) - { - gp_Vec2d veve(0., 0.); - Law_draw1dcurve(Curve(), veve, 1.); - } - #endif #endif } @@ -161,13 +89,6 @@ void Law_Interpol::SetInRelative(const NCollection_Array1& ParAndRad, inter.Perform(); SetCurve(inter.Curve()); #ifdef OCCT_DEBUG - #ifdef DRAW - if (Affich) - { - gp_Vec2d veve(0., 0.); - Law_draw1dcurve(Curve(), veve, 1.); - } - #endif #endif } diff --git a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Data.cxx b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Data.cxx index dd5ef523e9..433b1e4ddb 100644 --- a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Data.cxx +++ b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Data.cxx @@ -1394,9 +1394,6 @@ void HLRBRep_Data::NextInterference() } else { -#if 0 - printf("\n Rejection myFE:%5d myLE:%5d\n",myFE,myLE); -#endif } } else diff --git a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Intersector.cxx b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Intersector.cxx index 94638daed8..b33349820e 100644 --- a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Intersector.cxx +++ b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_Intersector.cxx @@ -521,21 +521,6 @@ void HLRBRep_Intersector::Perform(const gp_Lin& L, const double P) } double x0, y0, z0, x1, y1, z1, pmin, pmax; //,pp; myPolyhedron->Bounding().Get(x0, y0, z0, x1, y1, z1); -#if 0 - pmax = pmin = ElCLib::Parameter(L, gp_Pnt((x1+x0)*0.5, - (y1+y0)*0.5, - (z1+z0)*0.5)); - double d = (x1-x0) + (y1-y0) + (z1-z0); - pmin -= d; - pmax += d; - if (pmin > P) pmin = P - d; - if (pmax > P) pmax = P; - HLRBRep_ThePolygonOfInterCSurf Polygon(L,pmin,pmax,3); - myCSIntersector.Perform(L,Polygon,mySurface, - *((HLRBRep_ThePolyhedronOfInterCSurf*) - myPolyhedron)); - break; -#else //-- On va rejeter tous les points de parametres > P double p; p = ElCLib::Parameter(L, gp_Pnt(x0, y0, z0)); @@ -598,7 +583,6 @@ void HLRBRep_Intersector::Perform(const gp_Lin& L, const double P) *((HLRBRep_ThePolyhedronOfInterCSurf*)myPolyhedron)); break; -#endif } } #ifdef PERF diff --git a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.cxx b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.cxx index f390c0ee33..d3fde430ef 100644 --- a/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.cxx +++ b/src/ModelingAlgorithms/TKHLR/HLRBRep/HLRBRep_ThePolygonOfInterCSurf.cxx @@ -108,30 +108,4 @@ double HLRBRep_ThePolygonOfInterCSurf::ApproxParamOnCurve(const int Index, //================================================================================================== -void HLRBRep_ThePolygonOfInterCSurf::Dump() const -{ -#if 0 - static int Compteur=0; - char tamp[100]; - Compteur++; - Sprintf(tamp,"Poly%d",Compteur); - std::cout<<" @@@@@@@@@@@ F i c h i e r : "< %f \n",Binf,Bsup); - fprintf(fp,"\npol %d %d %f",Compteur,NbPntIn,TheDeflection); - gp_Pnt p1,p2; - for (int iObje=1; iObje<=NbSegments(); iObje++) { - p1=BeginOfSeg(iObje); - fprintf(fp,"\npnt %d %f %f",Compteur,p1.X(),p1.Y()); - } - p1=EndOfSeg(NbSegments()); - fprintf(fp,"\npnt %d %f %f",Compteur,p1.X(),p1.Y()); - fprintf(fp,"\ndispol %d\n#\n",Compteur); - fclose(fp); -#endif -} +void HLRBRep_ThePolygonOfInterCSurf::Dump() const {} diff --git a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx index 0e716bdaf6..554934b1ff 100644 --- a/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx +++ b/src/ModelingAlgorithms/TKMesh/BRepMesh/BRepMesh_DelaunayDeflectionControlMeshAlgo.hxx @@ -364,16 +364,6 @@ private: return false; } } -#if 0 - else if (GeomLib::NormEstim(aSurf, theMidPoint, Precision::Confusion(), aNorm1) != 0) - { - // It is better to consider the singular point as a node of triangulation. - // However, it leads to hangs up meshing some faces (including faces with - // degenerated edges). E.g. tests "mesh standard_incmesh Q6". - // So, this code fragment is better to implement in the future. - return false; - } -#endif return true; } diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx index f66c6c3de4..ba9952dc68 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Inter2d.cxx @@ -75,18 +75,6 @@ #include #include -#ifdef DRAW - #include - #include - #include - #include - #include - #include -bool Inter2dAffichInt2d; -static int NbF2d = 0; -static int NbE2d = 0; -static int NbNewVertices = 0; -#endif //================================================================================================= @@ -412,16 +400,6 @@ static void EdgeInter( NCollection_IndexedDataMap, TopTools_ShapeMapHasher>& aDMVV) { -#ifdef DRAW - if (Inter2dAffichInt2d) - { - char name[256]; - Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++); - DBRep::Set(name, E1); - Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++); - DBRep::Set(name, E2); - } -#endif if (E1.IsSame(E2)) return; @@ -697,16 +675,6 @@ static void RefEdgeInter( aDMVV, bool& theCoincide) { -#ifdef DRAW - if (Inter2dAffichInt2d) - { - char name[256]; - Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++); - DBRep::Set(name, E1); - Sprintf(name, "E2d_%d_%d", NbF2d, NbE2d++); - DBRep::Set(name, E2); - } -#endif // theCoincide = false; // @@ -1635,10 +1603,6 @@ void BRepOffset_Inter2d::Compute( theDMVV, const Message_ProgressRange& theRange) { -#ifdef DRAW - NbF2d++; - NbE2d = 0; -#endif // Do not intersect the edges of face NCollection_Map EdgesOfFace; diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx index bd0981d057..bcbc1b997d 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeLoops.cxx @@ -33,11 +33,6 @@ #include #include -#ifdef DRAW - #include -int NbF = 1; -static bool Affich = false; -#endif BRepOffset_MakeLoops::BRepOffset_MakeLoops() = default; @@ -496,14 +491,6 @@ void BRepOffset_MakeLoops::BuildFaces(const NCollection_List& LF, } if (ToRebuild) { -#ifdef DRAW - if (Affich) - { - char name[256]; - Sprintf(name, "CF_%d", NbF++); - DBRep::Set(name, F); - } -#endif //----------------------------------------------------------- // Non-reconstructed edges on other faces are added. diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx index db5979a7c1..2a83e4f34e 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_MakeOffset.cxx @@ -99,10 +99,6 @@ #include // POP for NT -#ifdef DRAW - - #include -#endif #ifdef OCCT_DEBUG #include // #define DEB_VERB @@ -139,34 +135,13 @@ static void DEBVerticesControl( { LVP.Append(it1LE.Value()); std::cout << "Vertex on at least 3 edges." << std::endl; - #ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "VP_%d", NVP++); - DBRep::Set(name, it1LE.Value()); - } - #endif } else if (AsDes->Ascendant(it1LE.Value()).Extent() > 3) { std::cout << "Vertex on more than 3 edges." << std::endl; - #ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "VM_%d", NVM++); - DBRep::Set(name, it1LE.Value()); - } - #endif } else { - #ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "VN_%d", NVN++); - DBRep::Set(name, it1LE.Value()); - } - #endif } } } @@ -746,10 +721,6 @@ static void RemoveCorks(TopoDS_Shape& } } S = SS; -#ifdef DRAW - if (AffichOffC) - DBRep::Set("myInit", SS); -#endif } //================================================================================================= @@ -1563,27 +1534,12 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR { const TopoDS_Shape& OFE = itLF.Value(); myImageOffset.SetRoot(OFE); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AF_%d", NbAF++); - DBRep::Set(name, OFE); - } -#endif NCollection_Map View; for (Exp2.Init(OFE.Oriented(TopAbs_FORWARD), TopAbs_EDGE); Exp2.More(); Exp2.Next()) { const TopoDS_Edge& COE = TopoDS::Edge(Exp2.Current()); myAsDes->Add(OFE, COE); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, COE); - COES.Add(COE); - } -#endif if (View.Add(COE)) { if (!myAsDes->HasDescendant(COE)) @@ -1608,13 +1564,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR // myInitOffsetFace.Bind(FI, OF); myImageOffset.SetRoot(OF); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AF_%d", NbAF++); - DBRep::Set(name, OF); - } -#endif const NCollection_List& LE = AsDes->Descendant(OF); for (itLF.Initialize(LE); itLF.More(); itLF.Next()) { @@ -1630,14 +1579,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR // const TopoDS_Edge& COE = // TopoDS::Edge(itLOE.Value().Oriented(OE.Orientation())); myAsDes->Add(OF, COE); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, COE); - COES.Add(COE); - } -#endif if (!myAsDes->HasDescendant(COE)) { @@ -1653,14 +1594,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR else { myAsDes->Add(OF, OE); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, OE); - COES.Add(OE); - } -#endif const NCollection_List& LV = AsDes->Descendant(OE); myAsDes->Add(OE, LV); @@ -1678,14 +1611,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR const TopoDS_Edge& COE = TopoDS::Edge(Exp2.Current()); myAsDes->Add(OF, COE); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, COE); - COES.Add(COE); - } -#endif if (View.Add(Exp2.Current())) { @@ -1804,14 +1729,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR { const TopoDS_Edge& COE = TopoDS::Edge(itLOE.Value()); myAsDes->Add(Cork, COE.Oriented(OE.Orientation())); -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, COE); - COES.Add(COE); - } -#endif if (!myAsDes->HasDescendant(COE)) { @@ -1831,14 +1748,6 @@ void BRepOffset_MakeOffset::BuildOffsetByInter(const Message_ProgressRange& theR { myAsDes->Add(OE, AsDes->Descendant(OE)); } -#ifdef DRAW - if (AffichInt2d) - { - Sprintf(name, "AE_%d", NbAE++); - DBRep::Set(name, OE); - COES.Add(OE); - } -#endif } } } diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx index 64a41afb02..c6563afcf4 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Offset.cxx @@ -80,10 +80,6 @@ static bool Affich = false; static int NbOFFSET = 0; #endif -#ifdef DRAW - #include - #include -#endif #include #include @@ -1458,17 +1454,10 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, NbOFFSET++; Sprintf(name, "VOnSph_%d", NbOFFSET); - #ifdef DRAW - DBRep::Set(name, Vertex); - #endif int NbEdges = 1; for (it.Initialize(LEdge); it.More(); it.Next()) { Sprintf(name, "EOnSph_%d_%d", NbOFFSET, NbEdges++); - #ifdef DRAW - const TopoDS_Shape& CurE = it.Value(); - DBRep::Set(name, CurE); - #endif } } #endif @@ -1522,17 +1511,6 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, TopoDS_Wire W; myBuilder.MakeWire(W); -#ifdef DRAW - // POP pour NT - // char name[100]; - if (Affich) - { - Sprintf(name, "SPHERE_%d", NbOFFSET); - DrawTrSurf::Set(name, S); - } - int CO = 1; -#endif - for (it.Initialize(LEdge); it.More(); it.Next()) { TopoDS_Edge E = TopoDS::Edge(it.Value()); @@ -1546,15 +1524,6 @@ void BRepOffset_Offset::Init(const TopoDS_Vertex& Vertex, C = new Geom_TrimmedCurve(C, f, l); C->Transform(Loc.Transformation()); -#ifdef DRAW - if (Affich) - { - Sprintf(name, "CURVE_%d_%d", NbOFFSET, CO); - DrawTrSurf::Set(name, C); - CO++; - } -#endif - occ::handle PCurve = GeomProjLib::Curve2d(C, S); // check if the first point of PCurve in is the canonical boundaries // of the sphere. Else move it. diff --git a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx index d145a07688..70a8877801 100644 --- a/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx +++ b/src/ModelingAlgorithms/TKOffset/BRepOffset/BRepOffset_Tool.cxx @@ -121,17 +121,6 @@ const double TheInfini = 1.e+7; // tma: for new boolean operation -#ifdef DRAW - #include - #include - #include -bool AffichInter = false; -static int NbNewEdges = 1; -static int NbFaces = 1; -static int NbFOB = 1; -static int NbFTE = 1; -static int NbExtE = 1; -#endif #ifdef OCCT_DEBUG static bool AffichExtent = false; @@ -713,16 +702,6 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1, NCollection_List& L2, const TopAbs_State Side) { -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F1); - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F2); - } -#endif occ::handle CI; TopAbs_Orientation O1, O2; @@ -770,14 +749,6 @@ void BRepOffset_Tool::PipeInter(const TopoDS_Face& F1, } L1.Append(E.Oriented(O1)); L2.Append(E.Oriented(O2)); -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "EI_%d", NbNewEdges++); - DBRep::Set(name, E.Oriented(O1)); - } -#endif } } } @@ -1384,16 +1355,6 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, const TopoDS_Face& theRefFace1, const TopoDS_Face& theRefFace2) { -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F1); - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F2); - } -#endif // Check if the faces are planar and not trimmed - in this case // the IntTools_FaceFace intersection algorithm will be used directly. @@ -1527,15 +1488,6 @@ void BRepOffset_Tool::Inter3D(const TopoDS_Face& F1, L1.Append(anEdge.Oriented(O1)); L2.Append(anEdge.Oriented(O2)); - -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "EI_%d", NbNewEdges++); - DBRep::Set(name, anEdge.Oriented(O1)); - } -#endif } } } @@ -1862,16 +1814,6 @@ bool BRepOffset_Tool::TryProject(const TopoDS_Face& F1, const TopAbs_State Side, const double TolConf) { -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F1); - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F2); - } -#endif // try to find if the edges are laying on the face F1. LInt1.Clear(); @@ -1916,14 +1858,6 @@ bool BRepOffset_Tool::TryProject(const TopoDS_Face& F1, } LInt1.Append(CurE.Oriented(O1)); LInt2.Append(CurE.Oriented(O2)); -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "EI_%d", NbNewEdges++); - DBRep::Set(name, CurE.Oriented(O1)); - } -#endif } else Ok = false; @@ -1939,16 +1873,6 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1, NCollection_List& L2, const TopAbs_State Side) { -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F1); - Sprintf(name, "FF_%d", NbFaces++); - DBRep::Set(name, F2); - } -#endif occ::handle CI; TopAbs_Orientation O1, O2; @@ -1997,14 +1921,6 @@ void BRepOffset_Tool::InterOrExtent(const TopoDS_Face& F1, } L1.Append(E.Oriented(O1)); L2.Append(E.Oriented(O2)); -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "EI_%d", NbNewEdges++); - DBRep::Set(name, E.Oriented(O1)); - } -#endif } } } @@ -2086,31 +2002,12 @@ static void ExtentEdge(const TopoDS_Face& F, B.UpdateEdge(NE, CNE2d, EF, BRep_Tool::Tolerance(E)); B.Range(NE, CNE2d->FirstParameter(), CNE2d->LastParameter()); NE.Orientation(E.Orientation()); -#ifdef DRAW - if (AffichExtent) - { - char name[256]; - Sprintf(name, "F_%d", NbExtE); - DBRep::Set(name, EF); - Sprintf(name, "OE_%d", NbExtE); - DBRep::Set(name, E); - Sprintf(name, "ExtE_%d", NbExtE++); - DBRep::Set(name, NE); - } -#endif } //================================================================================================= static bool ProjectVertexOnEdge(TopoDS_Vertex& V, const TopoDS_Edge& E, double TolConf) { -#ifdef DRAW - if (AffichExtent) - { - DBRep::Set("V", V); - DBRep::Set("E", E); - } -#endif BRep_Builder B; double f, l; double U = 0.; @@ -2185,9 +2082,6 @@ static bool ProjectVertexOnEdge(TopoDS_Vertex& V, const TopoDS_Edge& E, double T std::cout << "BRepOffset_Tool::ProjectVertexOnEdge Parameter no found" << std::endl; if (std::abs(f) < Precision::Infinite() && std::abs(l) < Precision::Infinite()) { - #ifdef DRAW - DBRep::Set("E", E); - #endif } } #endif @@ -2210,14 +2104,6 @@ void BRepOffset_Tool::Inter2d(const TopoDS_Face& F, NCollection_List& LV, const double TolConf) { -#ifdef DRAW - if (AffichExtent) - { - DBRep::Set("E1", E1); - DBRep::Set("E2", E2); - DBRep::Set("F", F); - } -#endif BRep_Builder B; double fl1[2], fl2[2]; LV.Clear(); @@ -2278,11 +2164,6 @@ void BRepOffset_Tool::Inter2d(const TopoDS_Face& F, if (C1.IsNull() || C2.IsNull()) { std::cout << "Inter2d : Pas de pcurve" << std::endl; - #ifdef DRAW - DBRep::Set("E1", E1); - DBRep::Set("E2", E2); - DBRep::Set("F", F); - #endif return; } #endif @@ -2478,11 +2359,6 @@ void BRepOffset_Tool::Inter2d(const TopoDS_Face& F, if (!YaSol) { std::cout << "Inter2d : Pas de solution" << std::endl; - #ifdef DRAW - DBRep::Set("E1", E1); - DBRep::Set("E2", E2); - DBRep::Set("F", F); - #endif } #endif } @@ -3598,14 +3474,6 @@ void BRepOffset_Tool::ExtentFace( const double TolConf, TopoDS_Face& NF) { -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FTE_%d", NbFTE++); - DBRep::Set(name, F); - } -#endif TopExp_Explorer exp, exp2; NCollection_DataMap Build; @@ -4096,15 +3964,6 @@ void BRepOffset_Tool::ExtentFace( } NF.Orientation(F.Orientation()); BRepTools::Update(NF); // Maj des UVPoints - -#ifdef DRAW - if (AffichInter) - { - char name[256]; - Sprintf(name, "FOB_%d", NbFOB++); - DBRep::Set(name, NF); - } -#endif } //================================================================================================= diff --git a/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx b/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx index 77534e0293..43f6630962 100644 --- a/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx +++ b/src/ModelingAlgorithms/TKOffset/BiTgte/BiTgte_Blend.cxx @@ -92,11 +92,6 @@ double t_mkcurve; extern void ChFi3d_InitChron(OSD_Chronometer& ch); extern void ChFi3d_ResultChron(OSD_Chronometer& ch, double& time); #endif -#ifdef DRAW -static bool Affich = false; -static char name[100]; - #include -#endif //================================================================================================= @@ -676,151 +671,6 @@ static TopoDS_Edge FindCreatedEdge( return E1; } -#ifdef DRAW -//======================================================================= -// function : Bubble -// purpose : Sets in increasing order the sequence of vertices. -//======================================================================= - -static void Bubble(const TopoDS_Edge& E, NCollection_Sequence& Seq) -{ - bool Invert = true; - int NbPoints = Seq.Length(); - double U1, U2; - TopoDS_Vertex V1, V2; - - while (Invert) - { - Invert = false; - for (int i = 1; i < NbPoints; i++) - { - TopoDS_Shape aLocalShape = Seq.Value(i).Oriented(TopAbs_INTERNAL); - V1 = TopoDS::Vertex(aLocalShape); - aLocalShape = Seq.Value(i + 1).Oriented(TopAbs_INTERNAL); - V2 = TopoDS::Vertex(aLocalShape); - // V1 = TopoDS::Vertex(Seq.Value(i) .Oriented(TopAbs_INTERNAL)); - // V2 = TopoDS::Vertex(Seq.Value(i+1).Oriented(TopAbs_INTERNAL)); - - U1 = BRep_Tool::Parameter(V1, E); - U2 = BRep_Tool::Parameter(V2, E); - if (U2 < U1) - { - Seq.Exchange(i, i + 1); - Invert = true; - } - } - } -} - -//================================================================================================= - -static void CutEdge(const TopoDS_Edge& E, - const NCollection_List& VOnE, - NCollection_List& NE) -{ - TopoDS_Shape aLocalShapeOrientedE = E.Oriented(TopAbs_FORWARD); - TopoDS_Edge WE = TopoDS::Edge(aLocalShapeOrientedE); - // TopoDS_Edge WE = TopoDS::Edge(E.Oriented(TopAbs_FORWARD)); - - double U1, U2; - TopoDS_Vertex V1, V2; - NCollection_Sequence SV; - NCollection_List::Iterator it(VOnE); - BRep_Builder B; - - for (; it.More(); it.Next()) - { - SV.Append(it.Value()); - } - //-------------------------------- - // Parse vertices on the edge. - //-------------------------------- - Bubble(WE, SV); - - int NbVer = SV.Length(); - //---------------------------------------------------------------- - // Construction of new edges. - // The vertices at the extremities of edges are not - // necessarily in the list of vertices - //---------------------------------------------------------------- - if (SV.IsEmpty()) - { - NE.Append(E); - return; - } - TopoDS_Vertex VF, VL; - double f, l; - BRep_Tool::Range(WE, f, l); - TopExp::Vertices(WE, VF, VL); - - if (NbVer == 2) - { - if (SV(1).IsEqual(VF) && SV(2).IsEqual(VL)) - { - NE.Append(E); - return; - } - } - //---------------------------------------------------- - // Processing of closed edges - // If a vertex of intersection is on the common vertex, - // it should appear at the beginning and the end of SV. - //---------------------------------------------------- - TopoDS_Vertex VCEI; - - if (!VF.IsNull() && !VF.IsSame(SV.First())) - SV.Prepend(VF); - if (!VL.IsNull() && !VL.IsSame(SV.Last())) - SV.Append(VL); - - V1 = TopoDS::Vertex(SV.First()); - SV.Remove(1); - - while (!SV.IsEmpty()) - { - - V2 = TopoDS::Vertex(SV.First()); - SV.Remove(1); - - if (V1.IsSame(V2)) - { - std::cout << "Vertex Confondus dans CutEdges" << std::endl; - continue; - } - //------------------------------------------- - // Copy the edge and restriction by V1 V2. - //------------------------------------------- - TopoDS_Shape aLocalShape = WE.EmptyCopied(); - TopoDS_Edge NewEdge = TopoDS::Edge(aLocalShape); - // TopoDS_Edge NewEdge = TopoDS::Edge(WE.EmptyCopied()); - B.Add(NewEdge, V1.Oriented(TopAbs_FORWARD)); - B.Add(NewEdge, V2.Oriented(TopAbs_REVERSED)); - if (V1.IsSame(VF)) - U1 = f; - else - { - aLocalShape = V1.Oriented(TopAbs_INTERNAL); - U1 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalShape), WE); - // U1 = BRep_Tool::Parameter - // (TopoDS::Vertex(V1.Oriented(TopAbs_INTERNAL)),WE); - } - if (V2.IsSame(VL)) - U2 = l; - else - { - aLocalShape = V2.Oriented(TopAbs_INTERNAL); - U2 = BRep_Tool::Parameter(TopoDS::Vertex(aLocalShape), WE); - // U2 = BRep_Tool::Parameter - // (TopoDS::Vertex(V2.Oriented(TopAbs_INTERNAL)),WE); - } - B.Range(NewEdge, U1, U2); - NE.Append(NewEdge.Oriented(E.Orientation())); - - V1 = V2; - } -} -#endif - //======================== END OF STATIC FUNCTIONS ============ //================================================================================================= @@ -1825,13 +1675,6 @@ void BiTgte_Blend::ComputeCenters() { std::cout << " No Lines of Generated Centers" << std::endl; } - #ifdef DRAW - else - { - if (Affich) - DBRep::Set("Unwind", myResult); - } - #endif #endif } @@ -1846,10 +1689,6 @@ void BiTgte_Blend::ComputeSurfaces() // 1 - Tubes (True Fillets) // 2 - Spheres. -#ifdef DRAW - int nbc = 1; -#endif - NCollection_List Empty; NCollection_DataMap, TopTools_ShapeMapHasher> EmptyMap; @@ -2236,15 +2075,6 @@ void BiTgte_Blend::ComputeSurfaces() L2.Append(V2); } } - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "%s_%d", "SURF", nbc); - DBRep::Set(name, AnOffset.Face()); - nbc++; - } -#endif } } @@ -2279,15 +2109,6 @@ void BiTgte_Blend::ComputeSurfaces() myCenters.Add(V); B.Add(myResult, OFT.Face()); - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "%s_%d", "SURF", nbc); - DBRep::Set(name, OFT.Face()); - nbc++; - } -#endif } } @@ -2301,27 +2122,6 @@ void BiTgte_Blend::ComputeShape() // - the faces neighbors of tubes that should be reconstructed preserving sharing. // For Debug : Visualize edges of the initial shape that should be reconstructed. -#ifdef DRAW - if (Affich) - { - NCollection_DataMap, TopTools_ShapeMapHasher>:: - Iterator itm(myCutEdges); - int NbEdges = 0; - for (; itm.More(); itm.Next()) - { - const TopoDS_Edge& E = TopoDS::Edge(itm.Key()); - const NCollection_List& VonE = itm.Value(); - NCollection_List NewE; - - CutEdge(E, VonE, NewE); - for (NCollection_List::Iterator it(NewE); it.More(); it.Next()) - { - Sprintf(name, "%s_%d", "CUTE", ++NbEdges); - DBRep::Set(name, it.Value()); - } - } - } -#endif // end debug NCollection_DataMap Created; diff --git a/src/ModelingAlgorithms/TKTopAlgo/BRepBndLib/BRepBndLib_1.cxx b/src/ModelingAlgorithms/TKTopAlgo/BRepBndLib/BRepBndLib_1.cxx index c8e7753deb..3e349b66db 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/BRepBndLib/BRepBndLib_1.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/BRepBndLib/BRepBndLib_1.cxx @@ -306,16 +306,6 @@ static bool CheckPoints(const TopoDS_Shape& theS, theOBB.GetVertex(&anArrPnts(aNbPnts)); } -#if 0 - for(int i = anArrPnts.Lower(); i <= anArrPnts.Upper(); i++) - { - const gp_Pnt &aP = anArrPnts(i); - std::cout << "point p" << i << " " << aP.X() << ", " << - aP.Y() << ", " << - aP.Z() << ", "<< std::endl; - } -#endif - theOBB.ReBuild(anArrPnts, aPtrArrTol, theIsOptimal); return (!theOBB.IsVoid()); diff --git a/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx b/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx index 4c9a3b4d40..ae5633968e 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/BRepBuilderAPI/BRepBuilderAPI_Collect.cxx @@ -29,9 +29,6 @@ bool Affich; #endif -#ifdef DRAW - #include -#endif //================================================================================================= static void BuildBack( @@ -184,17 +181,11 @@ static void DEBControl( { const TopoDS_Shape& OS = it.Key(); Sprintf(name, "SK_%d", ++IK); - #ifdef DRAW - DBRep::Set(name, OS); - #endif NCollection_List::Iterator itl(MG(OS)); int IV = 1; for (; itl.More(); itl.Next()) { Sprintf(name, "SV_%d_%d", IK, IV++); - #ifdef DRAW - DBRep::Set(name, NS); - #endif } } } diff --git a/src/ModelingAlgorithms/TKTopAlgo/BRepExtrema/BRepExtrema_ElementFilter.hxx b/src/ModelingAlgorithms/TKTopAlgo/BRepExtrema/BRepExtrema_ElementFilter.hxx index 88ad6b5683..66eaa5a20e 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/BRepExtrema/BRepExtrema_ElementFilter.hxx +++ b/src/ModelingAlgorithms/TKTopAlgo/BRepExtrema/BRepExtrema_ElementFilter.hxx @@ -44,4 +44,4 @@ struct BRepExtrema_ElementFilter } }; -#endif // _BRepExtrema_ElementFilter_HeaderFile \ No newline at end of file +#endif // _BRepExtrema_ElementFilter_HeaderFile diff --git a/src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeEdge2d.cxx b/src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeEdge2d.cxx index 2b7104f35a..7a2a54fdbc 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeEdge2d.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/BRepLib/BRepLib_MakeEdge2d.cxx @@ -570,13 +570,6 @@ void BRepLib_MakeEdge2d::Init(const occ::handle& CC, { B.MakeVertex(V1, P, preci); } -#if 0 - // desctivate control (RLE) for speed in sketcher - else if (P.Distance(BRep_Tool::Pnt(V1)) > preci) { - myError = BRepLib_DifferentsPointAndParameter; - return; - } -#endif } if (p2inf) @@ -594,13 +587,6 @@ void BRepLib_MakeEdge2d::Init(const occ::handle& CC, { B.MakeVertex(V2, P, preci); } -#if 0 - // desctivate control (RLE) for speed in sketcher - else if (P.Distance(BRep_Tool::Pnt(V2)) > preci){ - myError = BRepLib_DifferentsPointAndParameter; - return; - } -#endif } } diff --git a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx index 4a3cbfdb0a..2e5ee67a67 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Bisec.cxx @@ -35,14 +35,6 @@ #include #ifdef OCCT_DEBUG - // #define DRAW - #ifdef DRAW - #include - #pragma comment(lib, "TKDraw.lib") -static char name[100]; -static int nbb = 0; -static bool Affich = false; - #endif #endif static bool IsMaxRC(const occ::handle& C, double U, double& R); @@ -249,19 +241,6 @@ void Bisector_Bisec::Perform(const occ::handle& afirstcurve, UFirst = std::max(UFirst, Bis->FirstParameter()); ULast = std::min(ULast, Bis->LastParameter()); thebisector = new Geom2d_TrimmedCurve(Bis, UFirst, ULast); -#ifdef DRAW - if (Affich) - { - Sprintf(name, "c1_%d", ++nbb); - DrawTrSurf::Set(name, afirstcurve); - Sprintf(name, "c2_%d", nbb); - DrawTrSurf::Set(name, asecondcurve); - Sprintf(name, "p%d", nbb); - DrawTrSurf::Set(name, apoint); - Sprintf(name, "b%d", nbb); - DrawTrSurf::Set(name, thebisector); - } -#endif } //=========================================================================== @@ -401,20 +380,6 @@ void Bisector_Bisec::Perform(const occ::handle& afirstcurve, if (ULast > Bis->LastParameter()) ULast = Bis->LastParameter(); thebisector = new Geom2d_TrimmedCurve(Bis, UFirst, ULast); - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "c1_%d", ++nbb); - DrawTrSurf::Set(name, afirstcurve); - Sprintf(name, "c2_%d", nbb); - DrawTrSurf::Set(name, asecondpoint->Pnt2d()); - Sprintf(name, "p%d", nbb); - DrawTrSurf::Set(name, apoint); - Sprintf(name, "b%d", nbb); - DrawTrSurf::Set(name, thebisector); - } -#endif } //=========================================================================== @@ -551,20 +516,6 @@ void Bisector_Bisec::Perform(const occ::handle& afirstpoint, UFirst = std::max(UFirst, Bis->FirstParameter()); ULast = std::min(ULast, Bis->LastParameter()); thebisector = new Geom2d_TrimmedCurve(Bis, UFirst, ULast); - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "c1_%d", ++nbb); - DrawTrSurf::Set(name, afirstpoint->Pnt2d()); - Sprintf(name, "c2_%d", nbb); - DrawTrSurf::Set(name, asecondcurve); - Sprintf(name, "p%d", nbb); - DrawTrSurf::Set(name, apoint); - Sprintf(name, "b%d", nbb); - DrawTrSurf::Set(name, thebisector); - } -#endif } //=========================================================================== @@ -599,20 +550,6 @@ void Bisector_Bisec::Perform(const occ::handle& afirstpoint, oncurve); thebisector = new Geom2d_TrimmedCurve(Bis, Bis->ParameterOfStartPoint(), Bis->ParameterOfEndPoint()); - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "c1_%d", ++nbb); - DrawTrSurf::Set(name, afirstpoint->Pnt2d()); - Sprintf(name, "c2_%d", nbb); - DrawTrSurf::Set(name, asecondpoint->Pnt2d()); - Sprintf(name, "p%d", nbb); - DrawTrSurf::Set(name, apoint); - Sprintf(name, "b%d", nbb); - DrawTrSurf::Set(name, thebisector); - } -#endif } //================================================================================================= diff --git a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx index 40b5524684..91d1003a4c 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/Bisector/Bisector_Inter.cxx @@ -37,13 +37,6 @@ #include #ifdef OCCT_DEBUG - // #define DRAW - #ifdef DRAW - #include -static char name[100]; -static bool Affich = false; -static int nbint = 0; - #endif #endif //================================================================================================= @@ -327,25 +320,6 @@ void Bisector_Inter::SinglePerform(const occ::handle& CBis1, D2.FirstParameter(), D2.LastParameter()); } - -#ifdef DRAW - if (Affich) - { - Sprintf(name, "i1_%d", ++nbint); - DrawTrSurf::Set(name, Bis1); - Sprintf(name, "i2_%d", nbint); - DrawTrSurf::Set(name, Bis2); - if (IsDone() && !IsEmpty()) - { - for (int k = 1; k <= NbPoints(); k++) - { - gp_Pnt2d P = Point(k).Value(); - Sprintf(name, "ip_%d_%d", nbint, k); - DrawTrSurf::Set(name, P); - } - } - } -#endif } //=================================================================================== diff --git a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Circuit.cxx b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Circuit.cxx index 5ab96d2e3e..c936270d35 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Circuit.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Circuit.cxx @@ -42,13 +42,6 @@ IMPLEMENT_STANDARD_RTTIEXT(MAT2d_Circuit, Standard_Transient) #include #endif -#ifdef DRAW - #include - #include - #include -static occ::handle draw; -Standard_EXPORT Draw_Viewer dout; -#endif #ifdef OCCT_DEBUG static void MAT2d_DrawCurve(const occ::handle& aCurve, const int Indice); static bool AffichCircuit = 0; @@ -290,20 +283,6 @@ bool MAT2d_Circuit::IsSharpCorner(const occ::handle& Geom1, static bool Affich = 0; if (Affich) { - #ifdef DRAW - double DU1 = (OC1.LastParameter() - OC1.FirstParameter()) / 9.; - double DU2 = (OC2.LastParameter() - OC2.FirstParameter()) / 9.; - for (int ki = 0; ki <= 9; ki++) - { - gp_Pnt2d P1 = OC1.Value(OC1.FirstParameter() + ki * DU1); - gp_Pnt2d P2 = OC2.Value(OC2.FirstParameter() + ki * DU2); - occ::handle dr1 = new Draw_Marker2D(P1, Draw_Plus, Draw_vert); - occ::handle dr2 = new Draw_Marker2D(P2, Draw_Plus, Draw_rouge); - dout << dr1; - dout << dr2; - } - dout.Flush(); - #endif } #endif @@ -688,12 +667,6 @@ void MAT2d_Circuit::InsertCorner(NCollection_Sequence(Line.Value(isuiv)); - #ifdef DRAW - gp_Pnt2d P = Curve->StartPoint(); - occ::handle dr = new Draw_Marker2D(P, Draw_Plus, Draw_vert); - dout << dr; - dout.Flush(); - #endif } } #endif @@ -885,10 +858,6 @@ void MAT2d_DrawCurve(const occ::handle& aCurve, const int /*Indice { occ::handle type = aCurve->DynamicType(); occ::handle curve, CurveDraw; - #ifdef DRAW - occ::handle dr; - Draw_Color Couleur; - #endif if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) { @@ -937,27 +906,6 @@ void MAT2d_DrawCurve(const occ::handle& aCurve, const int /*Indice { CurveDraw = aCurve; } - - #ifdef DRAW - if (Indice == 1) - Couleur = Draw_jaune; - else if (Indice == 2) - Couleur = Draw_bleu; - else if (Indice == 3) - Couleur = Draw_rouge; - else if (Indice == 4) - Couleur = Draw_vert; - - if (type == STANDARD_TYPE(Geom2d_Circle)) - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 30); - else if (type == STANDARD_TYPE(Geom2d_Line)) - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 2); - else - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 500); - - dout << dr; - dout.Flush(); - #endif } #endif diff --git a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx index 11c1c2f797..dbe7f3eb8d 100644 --- a/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx +++ b/src/ModelingAlgorithms/TKTopAlgo/MAT2d/MAT2d_Tool2d.cxx @@ -16,18 +16,6 @@ #define Debug(expr) std::cout << " MAT2d_Tool2d.cxx : expr :" << expr << std::endl; // #define OCCT_DEBUG -// #define DRAW -#ifdef DRAW - #include - #include - #include -#endif - -#ifdef DRAW - #include - #include - #include -#endif #include #include @@ -66,10 +54,6 @@ #include #include -#ifdef DRAW -static occ::handle draw; -static int AffichBis = false; -#endif #ifdef OCCT_DEBUG static void MAT2d_DrawCurve(const occ::handle& aCurve, const int Indice); static bool Store = false; @@ -211,23 +195,11 @@ int MAT2d_Tool2d::TangentBefore(const int anitem, const bool IsOpenResult) if (type != STANDARD_TYPE(Geom2d_CartesianPoint)) { curve = occ::down_cast(theCircuit->Value(anitem)); -#ifdef DRAW - char* name = new char[100]; - Sprintf(name, "c%d", anitem); - DrawTrSurf::Set(name, curve); - delete[] name; -#endif theGeomVecs.Bind(theNumberOfVecs, curve->DN(curve->LastParameter(), 1)); } else { - curve = occ::down_cast(theCircuit->Value(item)); -#ifdef DRAW - char* name = new char[100]; - Sprintf(name, "c%d", item); - DrawTrSurf::Set(name, curve); - delete[] name; -#endif + curve = occ::down_cast(theCircuit->Value(item)); double param = (IsOpenResult && anitem == theCircuit->NumberOfItems()) ? curve->LastParameter() : curve->FirstParameter(); @@ -259,13 +231,7 @@ int MAT2d_Tool2d::TangentAfter(const int anitem, const bool IsOpenResult) type = theCircuit->Value(anitem)->DynamicType(); if (type != STANDARD_TYPE(Geom2d_CartesianPoint)) { - curve = occ::down_cast(theCircuit->Value(anitem)); -#ifdef DRAW - char* name = new char[100]; - Sprintf(name, "c%d", anitem); - DrawTrSurf::Set(name, curve); - delete[] name; -#endif + curve = occ::down_cast(theCircuit->Value(anitem)); thevector = curve->DN(curve->FirstParameter(), 1); } else @@ -275,13 +241,7 @@ int MAT2d_Tool2d::TangentAfter(const int anitem, const bool IsOpenResult) else item = (anitem == 1) ? 2 : (anitem - 1); - curve = occ::down_cast(theCircuit->Value(item)); -#ifdef DRAW - char* name = new char[100]; - Sprintf(name, "c%d", item); - DrawTrSurf::Set(name, curve); - delete[] name; -#endif + curve = occ::down_cast(theCircuit->Value(item)); double param = (IsOpenResult && anitem == 1) ? curve->FirstParameter() : curve->LastParameter(); thevector = curve->DN(param, 1); } @@ -419,14 +379,6 @@ void MAT2d_Tool2d::CreateBisector(const occ::handle& abisector) abisector->BisectorNumber(theNumberOfBisectors); abisector->Sense(1); -#ifdef DRAW - char* name = new char[100]; - Sprintf(name, "b%d", theNumberOfBisectors); - DrawTrSurf::Set(name, bisector.Value()); - Dump(abisector->BisectorNumber(), 1); - delete[] name; -#endif - #ifdef OCCT_DEBUG bool AffichDraw = false; if (AffichDraw) @@ -438,12 +390,6 @@ void MAT2d_Tool2d::CreateBisector(const occ::handle& abisector) if (Type1 == STANDARD_TYPE(Bisector_BisecAna)) { BasisCurve = occ::down_cast(bisector.Value()->BasisCurve())->Geom2dCurve(); - #ifdef DRAW - char* name = new char[100]; - Sprintf(name, "BISSEC_%d", abisector->BisectorNumber()); - DrawTrSurf::Set(name, BasisCurve); - delete[] name; - #endif } } #endif @@ -1060,25 +1006,11 @@ double MAT2d_Tool2d::IntersectBisector(const occ::handle& Bisector { if (Bisector1->StartPoint().Distance(PointSolution) < Tolerance) { -#ifdef DRAW - if (AffichBis) - { - DrawTrSurf::Set("Bis1", Bisector1); - DrawTrSurf::Set("Bis2", Bisector2); - } -#endif return Precision::Infinite(); } if (Bisector2->StartPoint().Distance(PointSolution) < Tolerance) { -#ifdef DRAW - if (AffichBis) - { - DrawTrSurf::Set("Bis1", Bisector1); - DrawTrSurf::Set("Bis2", Bisector2); - } -#endif return Precision::Infinite(); } } @@ -1422,10 +1354,6 @@ void MAT2d_DrawCurve(const occ::handle& aCurve, const int /*Indice { occ::handle type = aCurve->DynamicType(); occ::handle curve, CurveDraw; - #ifdef DRAW - occ::handle dr; - Draw_Color Couleur; - #endif if (type == STANDARD_TYPE(Geom2d_TrimmedCurve)) { @@ -1474,28 +1402,6 @@ void MAT2d_DrawCurve(const occ::handle& aCurve, const int /*Indice { CurveDraw = aCurve; } - - #ifdef DRAW - int Indice = 1; - if (Indice == 1) - Couleur = Draw_jaune; - else if (Indice == 2) - Couleur = Draw_bleu; - else if (Indice == 3) - Couleur = Draw_rouge; - else if (Indice == 4) - Couleur = Draw_vert; - - if (type == STANDARD_TYPE(Geom2d_Circle)) - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 30); - else if (type == STANDARD_TYPE(Geom2d_Line)) - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 2); - else - dr = new DrawTrSurf_Curve2d(CurveDraw, Couleur, 500); - - // dout << dr; - // dout.Flush(); - #endif } #endif diff --git a/src/ModelingData/TKBRep/BRepTools/BRepTools_Modifier.cxx b/src/ModelingData/TKBRep/BRepTools/BRepTools_Modifier.cxx index f612e5dee2..9ff8e1d46a 100644 --- a/src/ModelingData/TKBRep/BRepTools/BRepTools_Modifier.cxx +++ b/src/ModelingData/TKBRep/BRepTools/BRepTools_Modifier.cxx @@ -30,12 +30,6 @@ #include #include -#if 0 - #include - #include - #include -#endif - #include #include #include diff --git a/src/ModelingData/TKBRep/TKBRep_pch.hxx b/src/ModelingData/TKBRep/TKBRep_pch.hxx index 1cb17d317a..7b5535ba76 100644 --- a/src/ModelingData/TKBRep/TKBRep_pch.hxx +++ b/src/ModelingData/TKBRep/TKBRep_pch.hxx @@ -29,4 +29,4 @@ #include #include -#endif // TKBRep_HXX \ No newline at end of file +#endif // TKBRep_HXX diff --git a/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_Data_f2c.hxx b/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_Data_f2c.hxx index 6aa1d5c43b..dd3c0b83ab 100644 --- a/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_Data_f2c.hxx +++ b/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_Data_f2c.hxx @@ -40,12 +40,6 @@ typedef long int logical; typedef short int shortlogical; typedef char logical1; typedef char integer1; -#if 0 /* Adjust for integer*8. */ -typedef long long longint; /* system-dependent */ -typedef unsigned long long ulongint; /* system-dependent */ - #define qbit_clear(a, b) ((a) & ~((ulongint)1 << (b))) - #define qbit_set(a, b) ((a) | ((ulongint)1 << (b))) -#endif #define TRUE_ (1) #define FALSE_ (0) diff --git a/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_SysBase_baseinit.cxx b/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_SysBase_baseinit.cxx index 654f0fb0a1..0775029a3f 100644 --- a/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_SysBase_baseinit.cxx +++ b/src/ModelingData/TKGeomBase/AdvApp2Var/AdvApp2Var_SysBase_baseinit.cxx @@ -20,10 +20,6 @@ static int init_STBAS() { int ICODE = 0; // allocation tables are now local, so no global initialization is required -#if 0 - // Init du Tableau des allocs - AdvApp2Var_SysBase::mainial_(); -#endif // Init de LEC IBB IMP AdvApp2Var_SysBase::macinit_(&ICODE, &ICODE); // diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_FuncExtCS.cxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_FuncExtCS.cxx index d557d3ad84..51fb30670b 100644 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_FuncExtCS.cxx +++ b/src/ModelingData/TKGeomBase/Extrema/Extrema_FuncExtCS.cxx @@ -168,12 +168,6 @@ int Extrema_FuncExtCS::GetStateNumber() { if (!myCinit || !mySinit) throw Standard_TypeMismatch(); -#if 0 - math_Vector Sol(1, 3), UVSol(1, 3); - UVSol(1) = myt; UVSol(2) = myU; UVSol(3) = myV; - Value(UVSol, Sol); - std::cout <<"F(1)= "< GeomProjLib::Curve2d(const occ::handle& G2dC = new Geom2d_TrimmedCurve(G2dC, U1, U2); } -#ifdef DRAW - if (Affich) - { - static const char* aprojcurv = "projcurv"; - DrawTrSurf::Set(aprojcurv, G2dC); - } -#endif Tolerance = Proj.GetTolerance(); return G2dC; } diff --git a/src/ModelingData/TKGeomBase/IntAna/IntAna_IntLinTorus.cxx b/src/ModelingData/TKGeomBase/IntAna/IntAna_IntLinTorus.cxx index 63abaf23d9..08cd25204c 100644 --- a/src/ModelingData/TKGeomBase/IntAna/IntAna_IntLinTorus.cxx +++ b/src/ModelingData/TKGeomBase/IntAna/IntAna_IntLinTorus.cxx @@ -103,11 +103,6 @@ void IntAna_IntLinTorus::Perform(const gp_Lin& L, const gp_Torus& T) if (a0 > 0.0000000001) { aNbBadSol++; -#if 0 - std::cout<<" ------- Erreur : P Ligne < > P Tore "< C(1,31); - T.Coefficients(C); - const gp_Pnt& PL=L.Location(); - const gp_Dir& DL=L.Direction(); - - //---------------------------------------------------------------- - //-- X = ax1 l + ax0 - //-- X2 = ax2 l2 + 2 ax1 ax0 l + bx2 - //-- X3 = ax3 l3 + 3 ax2 ax0 l2 + 3 ax1 bx2 l + bx3 - //-- X4 = ax4 l4 + 4 ax3 ax0 l3 + 6 ax2 bx2 l2 + 4 ax1 bx3 l + bx4 - - double ax1,ax2,ax3,ax4,ax0,bx2,bx3,bx4; - double ay1,ay2,ay3,ay4,ay0,by2,by3,by4; - double az1,az2,az3,az4,az0,bz2,bz3,bz4; - double c0,c1,c2,c3,c4; - ax1=DL.X(); ax0=PL.X(); ay1=DL.Y(); ay0=PL.Y(); az1=DL.Z(); az0=PL.Z(); - ax2=ax1*ax1; ax3=ax2*ax1; ax4=ax3*ax1; bx2=ax0*ax0; bx3=bx2*ax0; bx4=bx3*ax0; - ay2=ay1*ay1; ay3=ay2*ay1; ay4=ay3*ay1; by2=ay0*ay0; by3=by2*ay0; by4=by3*ay0; - az2=az1*az1; az3=az2*az1; az4=az3*az1; bz2=az0*az0; bz3=bz2*az0; bz4=bz3*az0; - - //--------------------------------------------------------------------------- Terme X**4 - double c=C(1); - double a4 = c *ax4; - double a3 = c *4.0*ax3*ax0; - double a2 = c *6.0*ax2*bx2; - double a1 = c *4.0*ax1*bx3; - double a0 = c *bx4; - //--------------------------------------------------------------------------- Terme Y**4 - c = C(2); - a4+= c*ay4; - a3+= c*4.0*ay3*ay0; - a2+= c*6.0*ay2*by2; - a1+= c*4.0*ay1*by3; - a0+= c*by4; - //--------------------------------------------------------------------------- Terme Z**4 - c = C(3); - a4+= c*az4 ; - a3+= c*4.0*az3*az0; - a2+= c*6.0*az2*bz2; - a1+= c*4.0*az1*bz3; - a0+= c*bz4; - //--------------------------------------------------------------------------- Terme X**3 Y - c = C(4); - MULT_A3_B1(c4,c3,c2,c1,c0, ax3, 3.0*ax2*ax0, 3.0*ax1*bx2, bx3, ay1,ay0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme X**3 Z - c = C(5); - MULT_A3_B1(c4,c3,c2,c1,c0, ax3, 3.0*ax2*ax0, 3.0*ax1*bx2, bx3, az1,az0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Y**3 X - c = C(6); - MULT_A3_B1(c4,c3,c2,c1,c0, ay3, 3.0*ay2*ay0, 3.0*ay1*by2, by3, ax1,ax0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Y**3 Z - c = C(7); - MULT_A3_B1(c4,c3,c2,c1,c0, ay3, 3.0*ay2*ay0, 3.0*ay1*by2, by3, az1,az0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Z**3 X - c = C(8); - MULT_A3_B1(c4,c3,c2,c1,c0, az3, 3.0*az2*az0, 3.0*az1*bz2, bz3, ax1,ax0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Z**3 Y - c = C(9); - MULT_A3_B1(c4,c3,c2,c1,c0, az3, 3.0*az2*az0, 3.0*az1*bz2, bz3, ay1,ay0); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - - //--------------------------------------------------------------------------- Terme X**2 Y**2 - c = C(10); - MULT_A2_B2(c4,c3,c2,c1,c0, ax2, 2.0*ax1*ax0, bx2, ay2,2.0*ay1*ay0, by2); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme X**2 Z**2 - c = C(11); - MULT_A2_B2(c4,c3,c2,c1,c0, ax2, 2.0*ax1*ax0, bx2, az2,2.0*az1*az0, bz2); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Y**2 Z**2 - c = C(12); - MULT_A2_B2(c4,c3,c2,c1,c0, ay2, 2.0*ay1*ay0, by2, az2,2.0*az1*az0, bz2); - a4+= c*c4; a3+= c*c3; a2+= c*c2; a1+= c*c1; a0+= c*c0; - - //--------------------------------------------------------------------------- Terme X**3 - c = C(13); - a3+= c*( ax3 ); - a2+= c*( 3.0*ax2*ax0 ); - a1+= c*( 3.0*ax1*bx2 ); - a0+= c*( bx3 ); - //--------------------------------------------------------------------------- Terme Y**3 - c = C(14); - a3+= c*( ay3 ); - a2+= c*( 3.0*ay2*ay0 ); - a1+= c*( 3.0*ay1*by2 ); - a0+= c*( by3 ); - //--------------------------------------------------------------------------- Terme Y**3 - c = C(15); - a3+= c*( az3 ); - a2+= c*( 3.0*az2*az0 ); - a1+= c*( 3.0*az1*bz2 ); - a0+= c*( bz3 ); - - //--------------------------------------------------------------------------- Terme X**2 Y - c = C(16); - MULT_A2_B1(c3,c2,c1,c0, ax2, 2.0*ax1*ax0, bx2, ay1,ay0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme X**2 Z - c = C(17); - MULT_A2_B1(c3,c2,c1,c0, ax2, 2.0*ax1*ax0, bx2, az1,az0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Y**2 X - c = C(18); - MULT_A2_B1(c3,c2,c1,c0, ay2, 2.0*ay1*ay0, by2, ax1,ax0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Y**2 Z - c = C(19); - MULT_A2_B1(c3,c2,c1,c0, ay2, 2.0*ay1*ay0, by2, az1,az0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Z**2 X - c = C(20); - MULT_A2_B1(c3,c2,c1,c0, az2, 2.0*az1*az0, bz2, ax1,ax0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - //--------------------------------------------------------------------------- Terme Z**2 Y - c = C(21); - MULT_A2_B1(c3,c2,c1,c0, az2, 2.0*az1*az0, bz2, ay1,ay0); - a3+= c*c3; a2+= c* c2; a1+= c* c1; a0+= c*c0; - - //--------------------------------------------------------------------------- Terme X**2 - c = C(22); - a2+= c*ax2; - a1+= c*2.0*ax1*ax0; - a0+= c*bx2; - //--------------------------------------------------------------------------- Terme Y**2 - c = C(23); - a2+= c*ay2; - a1+= c*2.0*ay1*ay0; - a0+= c*by2; - //--------------------------------------------------------------------------- Terme Z**2 - c = C(24); - a2+= c*az2; - a1+= c*2.0*az1*az0; - a0+= c*bz2; - - - //--------------------------------------------------------------------------- Terme X Y - c = C(25); - a2+= c*(ax1*ay1); - a1+= c*(ax1*ay0 + ax0*ay1); - a0+= c*(ax0*ay0); - //--------------------------------------------------------------------------- Terme X Z - c = C(26); - a2+= c*(ax1*az1); - a1+= c*(ax1*az0 + ax0*az1); - a0+= c*(ax0*az0); - //--------------------------------------------------------------------------- Terme Y Z - c = C(27); - a2+= c*(ay1*az1); - a1+= c*(ay1*az0 + ay0*az1); - a0+= c*(ay0*az0); - - //--------------------------------------------------------------------------- Terme X - c = C(28); - a1+= c*ax1; - a0+= c*ax0; - //--------------------------------------------------------------------------- Terme Y - c = C(29); - a1+= c*ay1; - a0+= c*ay0; - //--------------------------------------------------------------------------- Terme Z - c = C(30); - a1+= c*az1; - a0+= c*az0; - - //--------------------------------------------------------------------------- Terme Constant - c = C(31); - a0+=c; - - std::cout<<"\n ---------- Coefficients Line - Torus : "<0.0000000001) { - std::cout<<" ------- Erreur : P Ligne < > P Tore "; - std::cout<<"Ligne : X:"<=-1e-10) { - nb_sol_valides++; - Coord_Ancien_Repere(tx,ty,Axe_rep); - lpnt[nb_sol_valides-1].SetValue(tx,ty,Log(S)); - } -#else - nb_sol_valides++; Coord_Ancien_Repere(tx, ty, Axe_rep); S = std::log(S); if (!HIsDirect) S = -S; lpnt[nb_sol_valides - 1].SetValue(tx, ty, S); -#endif } } nbp = nb_sol_valides; diff --git a/src/ModelingData/TKGeomBase/IntAna2d/IntAna2d_Outils.cxx b/src/ModelingData/TKGeomBase/IntAna2d/IntAna2d_Outils.cxx index 08a7614abe..1d0c8681c7 100644 --- a/src/ModelingData/TKGeomBase/IntAna2d/IntAna2d_Outils.cxx +++ b/src/ModelingData/TKGeomBase/IntAna2d/IntAna2d_Outils.cxx @@ -313,39 +313,3 @@ void Coord_Ancien_Repere(double& x1, double& y1, const gp_Ax2d& Dir1) x1 = x0; y1 = y0; } - -#if 0 - -//-- A Placer dans les ressources de la classe Conic ?? -//----------------------------------------------------------------------------- -//--- Calcul des Coefficients A,..F dans le repere lie a Dir1 -//--- A Partir des Coefficients dans le repere "Absolu" - -void Coeff_Nouveau_Repere(double& A,double& B,double& C - ,double& D,double& E,double& F - ,const gp_Ax2d Dir1) { - double t11,t12,t13; // x = t11 X + t12 Y + t13 - double t21,t22,t23; // y = t21 X + t22 Y + t23 - double A1,B1,C1,D1,E1,F1; - - // On a P0(x,y)=A x x + B y y + ... + F =0 (x et y ds le repere "Absolu") - // et on cherche P1(X(x,y),Y(x,y))=P0(x,y) - // Avec P1(X,Y)= A1 X X + B1 Y Y + 2 C1 X Y + 2 D1 X + 2 E1 Y + F1 - // = A x x + B y y + 2 C x y + 2 D x + 2 E y + f - - Dir1.Direction().Coord(t11,t21); - Dir1.Location().Coord(t13,t23); - - t22=t11; - t12=-t21; - - A1=(t11*(A*t11 + 2*C*t21) + B*t21*t21); - B1=(t12*(A*t12 + 2*C*t22) + B*t22*t22); - C1=(t12*(A*t11 + C*t21) + t22*(C*t11 + B*t21)); - D1=(t11*(D + A*t13) + t21*(E + C*t13) + t23*(C*t11 + B*t21)); - E1=(t12*(D + A*t13) + t22*(E + C*t13) + t23*(C*t12 + B*t22)); - F1=F + t13*(2.0*D + A*t13) + t23*(2.0*E + 2.0*C*t13 + B*t23); - - A=A1; B=B1; C=C1; D=D1; E=E1; F=F1; -} -#endif diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_CompProjectedCurve.cxx index 93ed24b46b..344e593072 100644 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -238,40 +238,6 @@ static void d2(const double t, // purpose : computes first derivative of the 3d projected curve //======================================================================= -#if 0 -static void d1CurvOnSurf(const double t, - const double u, - const double v, - gp_Vec& V, - const occ::handle& Curve, - const occ::handle& Surface) -{ - gp_Pnt S, C; - gp_Vec2d V2d; - gp_Vec DS1_u, DS1_v, DS2_u, DS2_uv, DS2_v, DC1_t; - Surface->D2(u, v, S, DS1_u, DS1_v, DS2_u, DS2_v, DS2_uv); - Curve->D1(t, C, DC1_t); - gp_Vec Ort(C, S);// Ort = S - C - - gp_Vec2d dE_dt(-DC1_t*DS1_u, -DC1_t*DS1_v); - gp_XY dE_du(DS1_u*DS1_u + Ort*DS2_u, - DS1_u*DS1_v + Ort*DS2_uv); - gp_XY dE_dv(DS1_v*DS1_u + Ort*DS2_uv, - DS1_v*DS1_v + Ort*DS2_v); - - double det = dE_du.X()*dE_dv.Y() - dE_du.Y()*dE_dv.X(); - if (fabs(det) < gp::Resolution()) throw Standard_ConstructionError(); - - gp_Mat2d M(gp_XY(dE_dv.Y()/det, -dE_du.Y()/det), - gp_XY(-dE_dv.X()/det, dE_du.X()/det)); - - V2d = - gp_Vec2d(gp_Vec2d(M.Row(1))*dE_dt, gp_Vec2d(M.Row(2))*dE_dt); - - V = DS1_u * V2d.X() + DS1_v * V2d.Y(); - -} -#endif - //======================================================================= // function : d2CurveOnSurf // purpose : computes second derivative of the 3D projected curve diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApprox.cxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApprox.cxx index 9bf6575320..54be6c5507 100644 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApprox.cxx +++ b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApprox.cxx @@ -43,10 +43,6 @@ #include #include -// #define DRAW -#ifdef DRAW - #include -#endif #ifdef OCCT_DEBUG // static bool AffichValue = false; #endif diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx index e9a5ac4025..45fe67d502 100644 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx +++ b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ComputeApproxOnPolarSurface.cxx @@ -62,10 +62,6 @@ // #include #ifdef OCCT_DEBUG - #ifdef DRAW - #include - #include - #endif // static int compteur = 0; #endif @@ -2002,17 +1998,9 @@ occ::handle ProjLib_ComputeApproxOnPolarSurface::ProjectUsi } occ::handle DummyC2d = new Geom2d_BSplineCurve(DummyPoles, DummyKnots, DummyMults, 1); - #ifdef DRAW - const char* Temp = "bs2d"; - DrawTrSurf::Set(Temp, DummyC2d); - #endif // DrawTrSurf::Set((const char* ) "bs2d",DummyC2d); occ::handle DDD = occ::down_cast(InitCurve2d); - #ifdef DRAW - Temp = "initc2d"; - DrawTrSurf::Set(Temp, DDD->ChangeCurve2d().Curve()); - #endif // DrawTrSurf::Set((const char* ) "initc2d",DDD->ChangeCurve2d().Curve()); #endif diff --git a/src/Visualization/TKMeshVS/MeshVS/MeshVS_SymmetricPairHasher.hxx b/src/Visualization/TKMeshVS/MeshVS/MeshVS_SymmetricPairHasher.hxx index 8efae7d5ab..8b4bc6aa20 100644 --- a/src/Visualization/TKMeshVS/MeshVS/MeshVS_SymmetricPairHasher.hxx +++ b/src/Visualization/TKMeshVS/MeshVS/MeshVS_SymmetricPairHasher.hxx @@ -43,4 +43,4 @@ struct MeshVS_SymmetricPairHasher } }; -#endif // _MeshVS_SymmetricPairHasher_HeaderFile \ No newline at end of file +#endif // _MeshVS_SymmetricPairHasher_HeaderFile diff --git a/src/Visualization/TKOpenGl/OpenGl/OpenGl_ShaderProgramDumpLevel.hxx b/src/Visualization/TKOpenGl/OpenGl/OpenGl_ShaderProgramDumpLevel.hxx index edc2007141..7bb2c063aa 100644 --- a/src/Visualization/TKOpenGl/OpenGl/OpenGl_ShaderProgramDumpLevel.hxx +++ b/src/Visualization/TKOpenGl/OpenGl/OpenGl_ShaderProgramDumpLevel.hxx @@ -25,4 +25,4 @@ enum OpenGl_ShaderProgramDumpLevel OpenGl_ShaderProgramDumpLevel_Full //!< Shader programs source code dump in full format. }; -#endif // _OpenGl_ShaderProgramDumpLevel_H__ \ No newline at end of file +#endif // _OpenGl_ShaderProgramDumpLevel_H__ diff --git a/src/Visualization/TKService/Graphic3d/Graphic3d_ToneMappingMethod.hxx b/src/Visualization/TKService/Graphic3d/Graphic3d_ToneMappingMethod.hxx index 2023a5dfcd..ee7b641351 100644 --- a/src/Visualization/TKService/Graphic3d/Graphic3d_ToneMappingMethod.hxx +++ b/src/Visualization/TKService/Graphic3d/Graphic3d_ToneMappingMethod.hxx @@ -23,4 +23,4 @@ enum Graphic3d_ToneMappingMethod Graphic3d_ToneMappingMethod_Filmic //!< Use filmic tone mapping }; -#endif // _Graphic3d_ToneMappingMethod_HeaderFile \ No newline at end of file +#endif // _Graphic3d_ToneMappingMethod_HeaderFile